Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Script to delete credentials

$
0
0

Is my script good. I'm trying to delete credentials(credential manager) when the users password is expirate.

Get-ADUser -Identity "%username%" -properties passwordneverexpires
 If(passwordneverexpires -eq $true) {
 cmdkey /delete:LegacyGeneric:target=MS.Outlook.15:%username%@wsg.nu
}
 Else {
 exit
}


Viewing all articles
Browse latest Browse all 21975

Latest Images

Trending Articles



Latest Images