Windows Updates Script

This is a little script which updates via PowerShell¬†the operating system   #Define update criteria. $Criteria = "IsInstalled=0 and Type='Software'" #Search for relevant updates. $Searcher = New-Object -ComObject Microsoft.Update.Searcher $SearchResult = $Searcher.Search($Criteria).Updates #Download updates. $Session = New-Object -ComObject Microsoft.Update.Session $Downloader = $Session.CreateUpdateDownloader() $Downloader.Updates = $SearchResult $Downloader.Download() #Install updates. $Installer = New-Object -ComObject Microsoft.Update.Installer $Installer.Updates = … Continue reading Windows Updates Script

Powershell script to move active directory machines to specific ou

Today I'll post a simple mini script that moves machines to a specific ou in active directory via powershell   The machines will be listed in a txt file like this ¬†( no spaces only intro ) example (machines.txt)   machine1 machine2 machine3   Create a ps1 with the following code get-content machines.txt | % … Continue reading Powershell script to move active directory machines to specific ou