#RestartComputersbyOU.ps1 Import-Module ActiveDirectory $ou = “CN=Computers,DC=domain,DC=local” $computers = Get-ADComputer -Filter * -SearchBase $ou ForEach ( $c in $computers ) { Restart-Computer -ComputerName $c.name -Force }
Category: Powershell
Dec 24 2014
Restart Computers in Sequential Order
Restarting servers is a necessary evil in a Windows administrator’s world. Unfortunately, you cannot not always just restart servers during maintenance as they may have a service dependent on another server. Due to this, you may need to restart your servers in sequential order. Luckily, powershell 3.0 makes this quite easy using the restart-computer commandlet. …
Apr 04 2014
365Licenses.ps1
#========================================================================= # 365Licenses.ps1 # VERSION: 1.0 # AUTHOR: Brian Steinmeyer # EMAIL: [email protected] # WEB: https://sigkillit.com # DATE: 4/4/20114 # REQUIREMENTS: # 1) Microsoft Online Services Sign-In Assistant for IT Professionals # -(http://www.microsoft.com/en-gb/download/details.aspx?id=28177) # 2) Windows Azure Active Directory Module for Windows PowerShell # -(http://technet.microsoft.com/en-us/library/jj151815.aspx#bkmk_installmodule) # COMMENTS: This script is intended to retrieve Office 365 …
- 1
- 2