If you just want to profile a local or remote system and get back the most commonly used pieces of information, then do not waste time for your own...
database-tools
Running Commands Elevated in PowerShell
Sometimes, a script may need to run a command that needs elevation (Administrator privileges). Instead of requiring the script to run with full...
Get-WirelessAdapter
In the previous tip, we illustrated how you can use Registry information to find wireless network adapters. Here is now a function...
Finding Wireless Network Adapters
There are many ways of finding network adapters, but apparently none to identify active wireless adapters. All information about your network...
Drive Data in GB and Percent
When a cmdlet returns raw data, you may want to convert the data into a better format. For example, WMI can report the free space of a drive but...
Five tiny features of SQL Diagnostic Manager you may not know about
SQL Diagnostic Manager has been around for a long time, and many of you have been using it for years. For today’s topic I thought it might be fun to...
Finding Hard Drives Running Low on Storage
WMI can retrieve information about drives easily. This will get you the drive information for your local machine (use -ComputerName to access a...
Finding Errors since Yesterday
Relative dates are important to get data within a special time frame, avoiding hard-coded dates and times. This script will get all error and...
Idera SQL XEvent Profiler – a free tool for XEvent monitoring
The Extended Events technology added to SQL Server in SQL 2008 and expanded upon greatly in SQL 2012 is a powerful mechanism for monitoring activity...
Exporting Data to Excel
You can easily convert object results to CSV files in PowerShell. This generates a CSV report of current processes: To open the CSV file in...
Finding Events around A Date
Often, you might want to browse all system events around a given date. Let's say a machine crashed at 08:47, and you'd like to see all...
Auto-Connecting with Public Hotspot
Many mobile phone service providers offer public hotspots at airports and public places. To connect, you typically need to browse to a logon page,...
Padding Strings Left and Right
If you must make sure that a given string has a uniform width, then you can use .NET methods to pad the string appropriately: $mytext =...
Formatting Numbers Easily
Often, users need to format numbers and limit the number of digits, or add leading zeros. There is one simple and uniform strategy for this: the...
Eliminating Duplicates
Sort-Object has an awesome feature: with the parameter -Unique, you can remove duplicates: This can be applied to object results, as well. Check out...
Beware Of Hidden Password Requests
You can run PowerShell code in any host, and Windows ships with powershell.exe and powershell_ise.exe. Many prefer the graphical ISE editor over the...
Tag Your Objects with Additional Information
There may be the need to add additional information to command results. Maybe you get data from different machines and want to keep a reference...
Save Time With Select-Object -First!
Select-Object has a parameter called -First that accepts a number. It will then return only the first x elements. Sounds simple, and it is. This...
Expanding Variables in Strings
To insert a variable into a string, you probably know that you can use double quotes like this: $domain = $env:USERDOMAIN $username = $env:USERNAME...
Using Aliases to Launch Windows Components
PowerShell is not just an automation language but also an alternate user interface. If you do not like the graphical interface, educate PowerShell...
Filtering Text-Based Command Output
Comparison operators act like filters when applied to arrays. So any console command that outputs multiple text lines can be used with comparison...
Keeping a Handle to a Process
When you launch an EXE file, PowerShell will happily start it, then continue and not care about it anymore: If you'd like to keep a handle to...
Use $PSScriptRoot to Load Resources
Beginning in PowerShell 3.0, there is a new automatic variable available called $PSScriptRoot. This variable previously was only available within...
Signing VBScript Files with PowerShell
You probably know that Set-AuthenticodeSignature can be used to digitally sign PowerShell scripts. But did you know that this cmdlet can sign...