How to completely log off a Windows 8 workstation from a Windows Server Domain

We have Windows 7 and Windows 8 PC connected to a Windows domain.  We know we can shut down the workstation or disconnected physically from the LAN to get a disconnection, but we want to disconnect the workstation from within the workstation itself and not perform a shut.  We don't want the server to disconnect the PC (we know how to do that), we need to do it from the workstation.  We need to clear all connection, address, links, etc. related to the domain from with the workstation.
rayluvsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Brian PiercePhotographerCommented:
Not sure exactly what you are trying to do? Remove the machine from the domain ?

netdom remove /d:domain_name computer_name /ud:domain_name\admin /pd:password
0
rayluvsAuthor Commented:
Yes, remove completely the machine from the LAN connection of said domain.  We don't want to delete the actual workstation "join" setup in the server.  We want to go to the workstation and disconnect completely from the domain.

Does netdom present in the windows 7 and 8 computer?
0
rayluvsAuthor Commented:
netdom.exe is no in our windows PC.

What we want is to completely disconnect from a domain server from within the workstation, the PC.
0
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Sikhumbuzo NtsadaIT AdministrationCommented:
Set the PC to hibernate and go to the network settings and configure it to allow the PC to turn off the NIC. Then your PC will be off the network during that hibernation period.
0
Brian PiercePhotographerCommented:
The netdom command will remove the machine from the domain, it needs to be run as administrator - but I don't think this is what you need - its a bit drastic.

I'm still not sure what you are hoping to achieve
0
rayluvsAuthor Commented:
A windows shut-down at the workstation, disconnects the said station from the domain.  When PC is shut down, the domain sees that the PC is no longer connected and all resources, etc. related to this PC is not available.  This does not mean that admin DELETED the workstation from the domain, it's just has been shut-down, not available; disconnected.

What we want is the same effect but on the workstation without SHUT-DOWN.  When we shut down the workstation, the PC is OFF, we can't use it and we are TOTALLY sure the PC is not connected to the Domain:  This is what we want, to totally disconnect the PC from the domain but without performing a shut-down, so the domain cannot see the PC and the PC cannot see the domain.  

Is there a way to do this at the workstation?
(is like disconnecting a mapped drive but instead of the drive, disconnect the domain)
0
Nagendra Pratap SinghDesktop Applications SpecialistCommented:
disconnect the lan cable. That will do.
0
rayluvsAuthor Commented:
can this be done without disconnecting the LAN cable?

What I mean is there any command statement that we can run?
0
rayluvsAuthor Commented:
placed attention.
0
cantorisCommented:
You could use this bit of PowerShell to disable all the network adapters:
Get-WmiObject -Class Win32_NetworkAdapter -Filter "PhysicalAdapter=True" | Invoke-WmiMethod -Name Disable | Out-Null

Open in new window

Plus a similar script with the Enable method for turning them back on again.

The batch file equivalent is:
wmic Path Win32_NetworkAdapter Where "PhysicalAdapter='True'" Call Disable >nul

Open in new window


Seems a bit severe and obviously the PC is now disconnected from the world, not just the domain.
0
rayluvsAuthor Commented:
We need to stay connected to the LAN.  There has to be a way the we can disconnect a PC from a server and still be connected to the LAN.  As stated before, we need to use internet, folders, printers and other resources from PC connected to the LAN.
0
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Without removing physical connection, or using a personal firewall (like the Windows Firewall service), there is no way to do that.

You can, of course, remove all active NetBIOS and TCP/IP connections referring to a specific server, but this is temporary. Servers advertise themselves, as other Windows PCs offering services do, and so the resources get known by PCs after a while anyway. And: If you do not manage to get all links removed (!), NetBIOS will retry to connect.

So if your question is about removing all active connections, then yes, can be done. What is needed is a batch file to remove all network share connections to a specific server. If you need the brute force approach also, killing all still open TCP connections, that is more demanding.
@echo off
for /F "tokens=2,3 delims=\ " %%A in ('net use ^|find "\\ServerName\"') do (
  if "%%~nA" == "" (net use %%A /d) else (net use \\%%A\%%B /d) 
)

Open in new window


As hinted, the "soft" approach is to enable a Windows Firewall rule to block all traffic from and to that server. That can be done with netsh advfirewall.
0
Lee W, MVPTechnology and Business Process AdvisorCommented:
What your asking is either poorly worded and we don't understand OR extremely unusual and we don't understand.  If we understood WHY you need to do this, we might have a solution for you.  Otherwise, the simple thing is to disable the network adapter.  No physical action required on the machine, but has the net effect of ensuring there are no active connections.
0
cantorisCommented:
Is there a way to do this at the workstation?  (is like disconnecting a mapped drive but instead of the drive, disconnect the domain)

In a word, "No".  The concept of "disconnecting the domain" you are looking for simply does not exist.  Your machine is joined to it or it is not.

You could try and block the PC and domain controllers from speaking to each other with firewall rules (if it's the DCs you're defining as the domain) but I don't understand why you'd want this.  You'd run out of cached logons, break the secure channel and end up disjoined from the domain.

The only scenario I can think of where someone might want to be on the domain but want a concept of being "disconnected from it" is an employee trying to keep his work PC under the radar!

If by appearing disconnected you simply just don't want things accessing network shares on the PC from elsewhere in the domain, then you could just stop the PC's Server service.
0
rayluvsAuthor Commented:
Yes, that sound like the answer; stopping the PC server service.

How do we stop it?

Ok, but first the "Why":  actually, there is no fundamental reason, is just that we have various server that we were testing and needed to somehow "reset" the connection to these server.  Initially, the only successful way was by shut-down and restart, but the reboot starting to become tedious and time-taking since we had to do this a lot times.  So we thought that there was a way to disconnect the PC from the server without discovering from the LAN, like when disconnecting a mapped drive.

Note that the PC is not part of a domain.  The PC when it connect to the LAN, we are assign a user which when we need to connect to the server folders, we log in.

Hope this gives a bit of explanation of why.
0
cantorisCommented:
If you want to restart the Server service, you can just do this with the Services Administration tool.

Or how about using
net session /delete

Open in new window

to kill all active sessions to the local computer.  Users connected to you might lose data though.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
There are different roles active in that play on every PC: server and client
From your last post it appears you are talking about propagating own services as a server. Indeed, this can be cut off by just shutting down the Server service whenever you don't need it. You could also set the PC to be hidden:
net config server /hidden:yes

Open in new window

That way the "server" does not show us as having shares.
0
rayluvsAuthor Commented:
"net session /delete" of course!!!

The "/delete" parameter along with remote PC-Name ends the local computer's session with that computer and closes all open files.  And if we do not supply the PC-Name, sessions on the local computer are deleted.

Just passed the info to our colleague and is a command that he used a lot back in the days of DOS (how could we have missed that... jajaja).

So to close this question, using "net session /delete" will disconnect our PC from the server and if we stop the "PC's Server service", it would only stop any share services we setup in our local computer, not close the session our local computer has with the server.

Are we correct with this?
0
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Not exactly. Both are only applying to connections to this PC, not from.

net session /delete is temporary, whenever a request is made to connect, it is tried again.
Stopping the service is permanent, but unspecific, as no other PC will be able to connect anymore.
0
rayluvsAuthor Commented:
That what we understand, both are applying to connections to our local PC.  Ok but if we have a connection to a server or PC and we run the "net session server-name /delete", wouldn't that close our local access connection to that server/PC?
0
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
No. For that you need to use net use /d with the respective share, as does the script in http:#a39734417 for all shares to a specific server.
However, you can kill all those by stopping the Workstation service.
0
rayluvsAuthor Commented:
Just re-read the entire thread and a couple of us ran thru recommendations of combination of he NET tool, the batch & PowerShell recommended, netsh advfirewall, plus the steps provided and definitely we have the necessary info to deal with this problem.  We have worked with each and it does the solve the problem and in some cases we needed to use the recommendations to disable the adapter (there was no other way).

Thank you all!!!
0
rayluvsAuthor Commented:
Chose /delete option as best because in our case, it our need of testing, in more times it did tell the testing tools we are doing that there is no connection.  Nevertheless,  all are "Best Answers".

Again thank you all!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.