ps1

Beware of Aliases

Can you spot what is wrong here? PS C:\> function r { "This never runs" } PS C:\> r function r { "This never runs" } PS C:\> When you run...

read more

Comparing Against $NULL

If you want to find out whether a variable contains $Null (nothing), always make sure you keep $null on the left side of the comparison. Most of the...

read more

Managing NTFS Permissions

While there are not many built-in cmdlets to manage NTFS permissions, there is a growing list of open source PowerShell modules adding these. One...

read more

Working with LDAP and Dates

LDAP filters are a fast and powerful way of retrieving information from Active Directory. However, LDAP filters use a very low-level date and time...

read more

Casting Data with Culture

When casting data (converting it to a different data type), PowerShell supports two approaches that can differ considerably. Here is an example:...

read more

Where-Object and .Where()

Beginning in PowerShell 4, you can use the Where() and Foreach() methods in place of Where-Object and ForEach-Object whenever you do not want to use...

read more

Dangerous Temp Files!

Internal system functions are often helpful, but always make sure you fully understand what they do. A particularly popular system method is called...

read more
1 41 42 43 44 45 128