Powershell

Auto-Logging Command Output

In the previous tip we introduced the PreCommandLookupAction supported by PowerShell 3 and better. Today we have a special implementation for you....

read more

Replacing Commands

PowerShell comes with a couple of “secret” (better: under-documented) settings. One is PreCommandLookupAction, and it gives you great...

read more

When Add-Type Fails…

Add-Type can be used to load additional .NET assemblies from DLL files into PowerShell. This works well most of the time, and here is a sample call...

read more

Clearing All User Variables

In the previous tip we illustrated how you can identify built-in PowerShell variables with an approach like this: $ps = [PowerShell]::Create() $null...

read more

Finding PowerShell Classes

Starting in PowerShell 5, you can define PowerShell classes. They are defined dynamically and live in memory. So how would you know the names of...

read more

Using PowerShell Classes

Starting with PowerShell 5, you can define classes. They have many use cases. One would be to create libraries of useful helper functions to better...

read more
1 41 42 43 44 45 130