ps1

Encoded Passwords

If you must put a credential object in your script, here is a way how you can convert a secure string into encrypted text: $password = Read-Host...

read more

Finding Exchange Mailboxes

Microsoft Exchange 2013 To find the number of mailboxes, simply use the Exchange cmdlets and have Measure-Object count the results: Get-Mailbox...

read more

Using Constants

All PowerShell versions Variables in PowerShell are volatile. You can overwrite and delete them – unless you create constants. Constants can...

read more

Sort Things with Type

All Versions Sort-Object is your one-stop solution for sorting. If it’s primitive data, simply pipe it to Sort-Object. If it is object data,...

read more

Suppress Confirmation

All PowerShell Versions Some cmdlets (like Remove-ADGroupMember) automatically ask for confirmation. This can be a problem in scripts running...

read more
1 62 63 64 65 66 128