powertips

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

Explore Objects

In PowerShell, anything is represented by objects, and here is a helpful one-liner that examines any object and copies its members as text into your...

read more

Managing Bit Flags (Part 1)

Occasionally, you might have to deal with bit flag values. Each bit in a number represents a certain setting, and your code might need to determine...

read more
1 37 38 39 40 41 122