powertips

Appending the Clipboard

PowerShell 5 introduces cmdlets to copy text to the clipboard, and paste it back: Set-Clipboard and Get-Clipboard. Set-Clipboard also supports the...

read more

Deleting User Profiles

Whenever a user logs on to your computer, a user profile is created, and in the previous tip we explained how PowerShell can dump a list of user...

read more

Execution Policy Override

If PowerShell won’t let you run a script, you may have to enable script execution first, for example like this: Set-ExecutionPolicy -Scope...

read more

Formatting Text Output

If you’d like to nicely format output text, you may want to use a PSCustomObject and output it as a formatted list like so: $infos =...

read more

Comparing String Lists

In a previous example we used HashSets to compare numeric lists, and find out which elements were found in both list, or in just one list. The same...

read more

Comparing Numeric Lists

Often a script needs to find out whether two lists are the same, or which elements are missing from a list. Instead of investing much programming...

read more

Tagging Objects Efficiently

Occasionally you see scripts that use Select-Object to append information to existing objects. This can look similar to the code below: Get-Process...

read more
1 29 30 31 32 33 122