OK, the actual question from class was how to force a client to reboot while someone is logged in. Be careful with this one. This will not give the user at the other end the opportunity to save anything.
Restart-Computer –ComputerName ComputerName –Force
Don’t sweat, standard user accounts cannot shutdown a domain controller. If you check the user rights on a domain controller, only the members of the Administrators, Backup Operators, Print Operators, and Server Operators groups can do this. Everyone else gets this:
Restart-Computer : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Restart-Computer –ComputerName ComputerName –Force
Don’t sweat, standard user accounts cannot shutdown a domain controller. If you check the user rights on a domain controller, only the members of the Administrators, Backup Operators, Print Operators, and Server Operators groups can do this. Everyone else gets this:
Restart-Computer : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Comments