Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Generate random strings with values inside
#Random Strings
0..4 |
ForEach-Object -Begin {
$values = 'Index', 'Stats', 'Backups', 'Restores', 'Checkdbs'
} -Process {
(New-Guid).ToString().Insert((Get-Random -Maximum ((New-Guid).ToString().Length)), $values[$_])
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment