posts-powershell

Fast String Operations

String concatenation is a frequent thing in scripts but when you use the "+=" operator to append text to a string, this slows down your...

Parse an Exact Date

If you need to parse a date or time information out of raw text, and if the date and time format does not adhere to the standards of your operating...

Faster Array Manipulations

The "+=" operator is pretty convenient and can add new elements to an array. If you need this more than once, for example in a loop, then...

Copy Command History to a Script

Sometimes you may have played around with the interactive PowerShell and suddenly realized that some of the commands you played with were pretty...

Compare Versions

Ever wanted to compare software versions? If you do it like this, the result is off: PS> '3.12.11.100' -gt '11.1.22.91' True...

Cleverly Aborting Endless Loop

In a previous tip you have seen how an endless loop can be used to continuously monitor things - until PowerShell is closed, or a user presses...

Finding Executable Path

Here is a one liner telling you the exact location of the executable of any running process. The example returns the path to the PowerShell...

Doing Things Forever

If you want PowerShell to run forever, for example in order to continuously ping a site, use a simple endless loop: #requires -Version 2...

Getting Basic Networking Information

Beginning with Windows 8.1 and Server 2012 R2, the operating system adds a wealth of new cmdlets for OS management. With these cmdlets, it is almost...

Investigating AD Classes

Active Directory organizes its content in classes like "user" or "computer". Each class has a predefined set of attributes, like...

Use Ctrl+Space in ISE!

The PowerShell ISE opens IntelliSense menus frequenty and helps you write code. Sometimes, however, IntelliSense does not pop up automatically,...

1 91 92 93 94 95 237