Windows 8.1/Server 2012 R2 Windows 8.1 and Server 2012 R2 come with a bunch of highly useful cmdlets for network adapter management. When you want...
ps1
Using Finally for Crucial Cleanup Tasks
PowerShell 2.0 and later In a previous tip we introduced an “acoustic progress bar” that made PowerShell play a sound for as long as it...
Automating PowerShell ISE
PowerShell 3.0 and later PowerShell ISE is completely scriptable and is accessible through the $psISE variable. This variable is present only within...
Finding Process Owner
PowerShell Version 3 or better Get-Process gets you a list of all running processes, but it will not reveal the process owner. To find the process...
Using JSON-based Web Services
PowerShell 3 and better There are plenty of information web services out in the Internet, and many of them return results in JSON format. Here is an...
Using Arrays as Parameter Default Values
PowerShell 3.0 and later If you define a PowerShell function with some parameters, and you want a given parameter to have a default value that is an...
Shorten the Prompt
PowerShell 3.0 and later By default, PowerShell includes the current path into the prompt, and when you launch PowerShell as regular user, the...
Getting DELL Warranty Information (Part 2)
PowerShell Version 2.0 and later In a previous tip we illustrated how you can use a web service to retrieve warranty information for DELL computers....
Normalizing File Extensions
PowerShell 2.0 and later Let’s assume you want the user to submit a list of file extensions, or you are getting them from some other source....
Using the PowerShell ISE Debugger
PowerShell 3.0 and later Sometimes, it is hard to find out why a PowerShell script is not doing what it should do. To get a better understanding of...
Using Code Regions in ISE
PowerShell 3.0 and later PowerShell ISE already supports collapsible code regions. When you write functions, loops, or conditions, you will notice a...
Process Killer (and some gotchas)
PowerShell 3.0 and later In a previous tip we explained how you can turn Out-GridView into a selection dialog, and suggested a couple of ideas. One...
Out-GridView: Universal Dialog
PowerShell 3.0 and later By default, Out-GridView is a one-way road: you can pipe data into it and display it in a grid view window, but you cannot...
Finding All Stoppable Services
PowerShell 3.0 and later Get-Service lists all services installed on your computer. It has no parameter to select only running or stopped services,...
Exporting Out-GridView Content
PowerShell 3.0 and later Out-GridView is a very useful cmdlet to output results to an extra window. Unlike outputting to the console, Out-GridView...
Getting a Clean PowerShell Environment
PowerShell 3.0 and later When you develop PowerShell scripts in the PowerShell ISE, you will probably make a lot of changes and revisions, and...
Adding PowerShell Tools to Windows 8 Start Screen
Windows 8/Windows 8.1 You may have noticed that the Windows 8 start screen by default is missing PowerShell tools like the PowerShell ISE. When you...
Find AD Replication Failures
Windows 8.1, Server 2012 R2 Investigating Active Directory replication failures becomes easy with Windows 8.1 and Server 2012 R2. A new cmdlet...
Useful Static .NET Methods
All Versions PowerShell can access static methods of .NET types. Here are some real world one-liners that can do a lot for you: [Math]::Round(7.9)...
Mandatory Parameters with a Dialog
All Versions Typically, when you declare a parameter as mandatory, and the user does not submit it, PowerShell takes care and prompts the user for...
Use Open File Dialog
All PowerShell versions To add some sophistication to your script, here is a simple function that opens the OpenFile dialog and lets the user pick a...
Logging Folders with Access Denied Errors
All Versions When you browse the file system with Get-ChildItem, you may stumble across folders that you have no access to view. If you’d like...
Managing Terminal Service Settings
ActiveDirectory Module Sometimes you may want to directly access properties related to the terminal service in an Active Directory account. Here is...
Credential Obfuscator
PowerShell ISE 3.0 and later While it is generally not recommended to hard code passwords in scripts, there are sometimes scenarios where this is...