Did you ever want to compare the properties of ADUsers? Provided you have installed the RSAT tools, you can read individual AD users with...
posts-powershell
Exporting and Importing Code-Signing Certificates
In the previous tip we explained how you can create self-signed code-signing certificates in Windows 10 and Server 2016 (and better). Today,...
Creating Code-Signing Certificates
Windows 10 and Server 2016 (and better) ship with an enhanced New-SelfSignedCert cmdlet that finally can create code-signing certificates. With...
Using Catalog Files to Maintain Folder Integrity
If you’d like to make sure a folder content stays untouched, you can use catalog files. A catalog file lists all folder content plus creates...
Finding PowerShell Named Pipes
Each PowerShell host running PowerShell 5 or better opens a “named pipe” that you can detect. The code below identifies these named...
Finding the Latest PowerShell 6 Download URL
PowerShell 6 is open-source and maintained in a public repository on GitHub. There are frequent releases. Here is a way how you can find out the...
Finding Latest PowerShell 6 Release (and Download URLs)
PowerShell 6 is open-source and maintained in a public repository on GitHub. There are frequent releases. If you don’t want to dig your way...
Finding Latest PowerShell 6 Release
PowerShell 6 is open-source, and there are frequently new releases available. You can always visit https://github.com/PowerShell/PowerShell/releases...
PowerShell ISE Module Browser
If you are using the built-in PowerShell ISE, you might find the “Module Browser Add-on” useful. It is fairly old and was published in...
Converting SecureString to String
Sometimes it can make sense to convert a SecureString back to a regular string, for example because you have used the shielded input provided by...
Real-Time Processing for Language Structures
In the previous tip we looked at queues and how they can search the entire file system: # create a new queue $dirs =...
Using a Queue instead of a Recursion
Rather than calling functions recursively, you may at times want to use a Queue object that you can load with fresh tasks while you are unloading...
Finding Service Privileges
Get-Service can provide basic information about Windows services but won’t list the required privileges. Here is a small PowerShell function...
Using Variable Breakpoints (Part 2)
In the previous tip we examined Set-PSBreakpoint to create dynamic variable breakpoints in PowerShell. We showed how a breakpoint can trigger when a...
Using Variable Breakpoints (Part 1)
For debugging, variable breakpoints can be of invaluable help. They break into the debugger once a variable changes. If you know that a variable...
Hiding Properties in Return Results
By default, PowerShell shrink-fits most objects and shows only the most important properties by default: PS C:\> Get-WmiObject -Class Win32_BIOS...
Locking Workstation
PowerShell can access low-level API functions by using C#-style signatures. This way, API functions are compiled in-memory and added as new types....
Command Discovery Unleashed (Part 2)
When you enter a command in PowerShell, the engine triggers three events to actually discover the command you want to execute. This gives you a...
Command Discovery Unleashed (Part 1)
Whenever you enter a command in PowerShell, a series of events takes place to figure out where the command is located. This starts with a...
Adding Numbers to a String (Part 2)
In the previous tip we illustrated a number of ways how to safely add variables to string content. Adding variables to double-quoted text can expose...
Adding Numbers to a String (Part 1)
Double-quoted strings can easily expand variables, however this concept is not foolproof: $id = 123 # this is the desired output: # Number is 123: #...
Get-PSCallStack and Debugging
In the previous tip we have used Get-PSCallStack to determine the “nest level” of code. Let’s today take a look at how this cmdlet...
Discovering Nesting Level
Get-PSCallStack returns a so-called “Call Stack” which – in its simplest form – tells you the nesting depth of your code:...
Super Simple Random Password Generator
Here is a super simple approach to create random passwords. The approach makes sure no ambiguous characters are used but does not care about other...