shutdown computer in ad and ou

 

1. powershell

Shutdown-computer –computername (gc c:\temp\serverlist.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: \\computername\c$ /user:yourusername yourpassword
shutdown /s /f /m \\computername
net use x: /delete




posted @ 2014-03-21 15:25  zyip  阅读(233)  评论(0编辑  收藏  举报