Added new script to windows folder (#144)

This commit is contained in:
Kungumaraj Nachimuthu 2019-10-04 14:02:37 -07:00 коммит произвёл Jorge Cotillo
Родитель aacf75fe3b
Коммит 82ac6a2cca
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