Shutdown all your Windows computers in Active Directory with PowerShell
Have you ever wanted to get fired quickly? If so, here is a great way to go out in a blaze of disruption and destruction. Using one PowerShell command, we can bring down all Windows machines in Active Directory at once. Using -Force will ensure even if a user is logged on, the machine will immediately shut down.
I suppose you can think of this as an ultimate panic button in case your domain has been severely compromised 🙂
C:\> Stop-Computer -ComputerName (Get-ADComputer -Filter * | >> | Select-Object -ExpandProperty Name) -Force -ThrottleLimit 1000
Go ahead, try it out. JUST KIDDING. Please never do this.
There are a few other scenarios where I think this would be appropriate:
- You are extremely intoxicated
- You want to piss off your entire company
- You want to watch the world burn