POWERSHELL - Scripts to reset the AdmPwdExpirationTime for AD Computers in LAPS
LAPS powershell script to reset the AdmPwdExpirationTime for AD Computers
Import-Module ActiveDirectory
Import-CSV "C:\Test.csv" | ForEach-Object {
$Computer = $_.ComputerName
Set-ADComputer -Identity $Computer -Clear ms-Mcs-AdmPwdExpirationTime
} # | Out-File -filepath "C:\output.txt"
Import-Module ActiveDirectory
Import-CSV "C:\Test.csv" | ForEach-Object {
$Computer = $_.ComputerName
Set-ADComputer -Identity $Computer -Clear ms-Mcs-AdmPwdExpirationTime
} # | Out-File -filepath "C:\output.txt"
Comments
Post a Comment