This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import list of Users From CSV into $Userlist | |
$UserList=IMPORT-CSV driveletter:\pathtofile.csv | |
# Step through Each Item in the List | |
FOREACH ($Person in $UserList) { | |
# Build Username |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
Clean up machines with bad (old/corrupt) machine Registry.pol files | |
.DESCRIPTION | |
Taking a array as input, this cmdlet assists in keeping machines in a healthy state to accept Group Policy driven changes | |
by confirming the last modified date of the machines Registry.pol and if older than a day , remove it, (or doesn't exist) | |
followed by a forced Machine Policy update. | |
To work against older WMF/Powershell environments, invoke-command + invoke-gpupdate have been avoided. | |
.EXAMPLE | |
Repair-RegistryPol -Computers workstation1,workstation2 |
OlderNewer