All PowerShell versions Typically, NTFS permissions in the file system are inherited. You can, however, add explicit permissions to files and...
All PowerShell versions Typically, NTFS permissions in the file system are inherited. You can, however, add explicit permissions to files and...
All Versions Typically, to access COM objects, these objects need to register themselves in the Windows Registry, and PowerShell needs the...
GroupPolicy Module When you create a new Group Policy, you can set a comment (or description). There is no apparent way, however, to change the...
All PowerShell versions With Get-Acl, you can output the security information from files and folders as plain text in SDDL format (Security...
All PowerShell Versions Here is a clever trick how to find out how many lines a string (not a string array!) contains: $text = @' This is some...
All PowerShell Versions To find the smallest and largest item in a range of numbers, use Measure-Object: $list = 1,4,3,1,3,12,990 $result = $list |...
All PowerShell versions When you use Get-ChildItem to get a list of files, you may have noticed that the -Filter parameter occasionally returns more...
Test-Path can test whether or not a given file or folder exists. This works fine for paths that use a drive letter, but can fail with pure UNC...
Credential objects contain a username and a password. You can create them using Get-Credential, and then supply this object to any cmdlet that has...
Beginning in PowerShell 3.0, there is a new automatic variable available called $PSScriptRoot. This variable previously was only available within...
By default, Active Directory returns only the first 1000 search results when you use an ADSISearcher. This is a security mechanism designed to...
Converting SID from Binary to String Active Directory accounts contain the SID in binary form. To convert the byte array into a string...