Added new script to windows folder

This commit is contained in:
kungumaraj nachimuthu 2019-10-04 14:00:55 -07:00
Родитель aacf75fe3b
Коммит 2b584b53eb
1 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,22 @@
param(
[Parameter(Mandatory = $True)]
[Int]$MaxPwdAge,
[Parameter(Mandatory = $True)]
[Int]$MinPwdAge,
[Parameter(Mandatory = $True)]
[Int]$MinPwdLength,
[Parameter(Mandatory = $True)]
[Int]$PwdHistoryCount,
[Parameter(Mandatory = $True)]
[String]$Identity
)
$maximumPwdAge = New-TimeSpan -Days $MaxPwdAge
$minimumPwdAge = New-TimeSpan -Days $MinPwdAge
Set-ADDefaultDomainPasswordPolicy -ComplexityEnabled $true -MaxPasswordAge $maximumPwdAge -MinPasswordAge $minimumPwdAge -MinPasswordLength $MinPwdLength -PasswordHistoryCount $PwdHistoryCount -Identity $Identity