shutdown computer in ad and ou

1. powershell

Shutdown-computer –computername (gc c: empserverlist.txt) –force –throttlelimit 10

http://blogs.technet.com/b/heyscriptingguy/archive/2011/04/01/scripting-wife-uses-powershell-to-shut-down-computers.aspx

2.C#

get computers from ou

http://stackoverflow.com/questions/5161157/get-computer-from-ou

 http://stackoverflow.com/questions/21428263/add-enabled-computer-to-active-directory-ou

 3. C# programming with AD, almost everythig

http://www.codeproject.com/Articles/18102/Howto-Almost-Everything-In-Active-Directory-via-C

 4.

net use x: \computernamec$ /user:yourusername yourpassword
shutdown /s /f /m \computername
net use x: /delete




原文地址:https://www.cnblogs.com/zyip/p/3615973.html