Archive | PowerShell RSS feed for this section

Generating strong random passwords in PowerShell

The sample in this posting demonstrates how to generate a random password using a cryptographically strong random number generator. The sample will generate either a password as a secure string or as a standard string. It is best practice to use secure strings for passwords but for demonstration purposes they are rather dull because by […]

Continue reading

Difference between single quotes and double quotes in PowerShell

If you are new to PowerShell you may find the use of ‘ and " for enclosing strings confusing. Both single quotes and double quotes can be used to enclose a string. There is a difference and it is best to demonstrate this by example $fruit = ‘peaches, apples and mangoes’ $singleQuoteText = ‘I like […]

Continue reading