Powershell

Managing NTFS Permissions

In a previous tip we showed how you can add NTFS permission rules to a folder. To find out what kind of permissions are assignable, take a look at...

read more

Splitting Long Lines

To improve readability, you can break PowerShell lines into separate lines. Get-Service | Where-Object { $_.Status -eq 'Running' }...

read more

Finding Executable

Many file extensions are associated with executables. You can then use Invoke-Item to open a document with this executable. Finding out just which...

read more

Test Nested Depth

When you call a function, PowerShell increases the nest level. When a function calls another function, or script, this will again increase the nest...

read more

Aborting Pipeline

Sometimes you might want to abort a pipeline when a certain condition is met. Here is a creative way of doing this. It works all the way back to...

read more

"Continue" and Labels

When you use the "Continue" statement inside a loop, you can skip the remainder of this loop iteration, and continue with the next....

read more

Get Memory Consumption

To get a rough understanding how much memory a script takes, or how much memory PowerShell puts aside when you store results in a variable, here is...

read more

Aborting the Pipeline

If you know beforehand how many results you expect from a pipeline, you can use Select-Object to stop the upstream cmdlets. This can save a lot of...

read more
1 64 65 66 67 68 130