Skip to content
KBHost
Menu
216.73.216.188
KBHost
FileHost
Home
/
Knowledgebase
/
PowerShell & cmd
/
Snippets
/
Generate Random Passwords
Generate Random Passwords
0
0
Also see:
Bulk change AD passwords
.
Generate-RandomPassword Function:
function Generate-RandomPassword { $consonants = "bcdfghjklmnpqrstvwxyz" $vowels = "aeiou" $numbers = 0..9 | ForEach-Object { "$_" } $specialChar = "!" # Eerste karakter is een hoofdletter medeklinker $password = (Get-Random -InputObject $consonants.ToCharArray() -Count 1).ToString().ToUpper() # Vervolgkarakters zijn afwisselend kleine klinkers en medeklinkers for ($i = 0; $i -lt 3; $i++) { $password += (Get-Random -InputObject $vowels.ToCharArray() -Count 1) $password += (Get-Random -InputObject $consonants.ToCharArray() -Count 1) } # Voeg 6 willekeurige cijfers toe $password += (Get-Random -InputObject $numbers -Count 6) -join '' # Voeg het speciale teken toe $password += $specialChar return $password } # Genereer een wachtwoord $generatedPassword = Generate-RandomPassword Write-Output $generatedPassword
No sleep -
00:00
Password Generator
Most viewed
Connect to Office 365 with PowerShell
Silent update Microsoft Remote Desktop
Add Microsoft Photos app to Server 2019
Enable NFS client in Windows 10
Clear Outlook filter for all folders
Asus ZenWiFi LED color status
Ventoy Windows 11 To Go
Find and delete all snapshots
Most recent
Install or Update reMarkable
TrueNAS Clear failed jobs history
TrueNAS SSH Hetzner Storage Box Rsync
Print Screen from PowerShell
Create local user during Windows Setup
Force Microsoft 365 installation
Enable MailTips in Microsoft 365
Get Home Assistant Logs
We use cookies to ensure the best experience on our website. If you continue to use this site, we assume that you are happy with this.
Ok