有没有办法以新的拆分形式If($Current_Date -ge $Expired_Date)
{
#Get the user name. You have not mentioned how you are getting the users' list
Disable-ADAccount -Identity "CN=UserName,OU=L1Engineers,OU=UserAccounts,DC=DOMAIN,DC=COM"
Write-Output "Account has been disabled for the user Username"
}
else
{
Write-Output "Account has not been expired"
}
模式打开文件?
谢谢!