Генерация пароля

Материал из WIKI vinote
Версия от 11:27, 5 мая 2025; Onix (обсуждение | вклад) (Новая страница: «Function Generate-Complex-Domain-Password ([Parameter(Mandatory=$true)][int]$PassLenght) { Add-Type -AssemblyName System.Web $requirementsPassed = $false do { $newPassword=[System.Web.Security.Membership]::GeneratePassword($PassLenght,1) If (($newPassword -match '[a-z]') ` -and ($newPassword -match '[A-Z]') ` -and ($newPassword -match '[1-9]') ` -and ($newPassword -notmatch '[0oO\{\}\(\)\;\:\\\/\*\+\<\>l\^_\?\[\]\|\.\-\=]') ) { $requirementsPassed=$True } }...»)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)
Перейти к навигации Перейти к поиску

Function Generate-Complex-Domain-Password ([Parameter(Mandatory=$true)][int]$PassLenght) { Add-Type -AssemblyName System.Web $requirementsPassed = $false do { $newPassword=[System.Web.Security.Membership]::GeneratePassword($PassLenght,1) If (($newPassword -match '[a-z]') ` -and ($newPassword -match '[A-Z]') ` -and ($newPassword -match '[1-9]') ` -and ($newPassword -notmatch '[0oO\{\}\(\)\;\:\\\/\*\+\<\>l\^_\?\[\]\|\.\-\=]') ) { $requirementsPassed=$True } } While ($requirementsPassed -eq $false) return $newPassword } Generate-Complex-Domain-Password (16)