Once you pin PowerShell to your taskbar, you can always right-click the pinned PowerShell icon to open a jump list and launch PowerShell or the ISE...
database-tools
Monitoring Log Files
Beginning in PowerShell 3.0, it is easy to monitor text-based log files in real-time. Try this: $Path = "$home\Desktop\testfile.txt"...
Press F1 to Navigate PowerShell Help Topics
To get extensive help for all kinds of PowerShell operators in the PowerShell 3.0 ISE editor, first list all the different help topics about...
Keyboard Trick
In the PowerShell ISE 4.0 command pane, when you hold CTRL, you can then use ArrowUp to move out of the command line into the results area. ReTweet...
Finding Active Directory Users with Missing Mail Address
LDAP queries are extremely powerful and can help find accounts that are missing information. This code would return all Active Directory users that...
Getting Excuses Automatically
Tired of inventing lame excuses yourself? Then here's a script that gets you a new excuse any time you call Get-Excuse! All you need is Internet...
Exporting and Importing PowerShell History
PowerShell keeps a list of all commands you enter, but once you close PowerShell, the list is lost. Here is a simple one-liner that saves the...
Capitalizing Words
To correctly capitalize words (making sure the first character is capitalized), you can either use regular expressions or a little system function....
Finding Default Outlook Profile
PowerShell can access COM objects like Outlook Application. These two simple lines return the current Outlook profile: $outlookApplication =...
Dynamic Methods in PowerShell 4
Beginning with PowerShell 4.0, method names may come from variables. Here's a simple example: $method = 'ToUpper'...
Dynamic Parameters in PowerShell 4.0
In PowerShell, you can use variables in place of properties. This sample script defines the four property names that return profile paths, then...
Using iAnywhere Driver, how to fix conversion errors using dates which used to work with the old driver ?
In Aqua Data Studio 14.0.0, I checked the option "Use iAnywhere Driver" for a Sybase IQ 15+ Server property to test the Bulk Import Feature. The...
The Cheat-Sheet on SharePoint’s Distributed Cache
I was in Indiana this past weekend at SharePoint Saturday Indianapolis, and one of the presentations I delivered at the event was a favorite of...
Replacing Specific Characters in a Text
If you just need to replace characters anywhere in a text, you are easy off. This would capitalize every "l" in a text: "Hello...
Weird Text Formatting (and what to do about it)
Check out this code and try to find the problem: $desc = Get-Process -Id $pid | Select-Object -Property Description "PowerShell process...
Finding Services in PowerShell
Get-Service lists all services on a computer, but the information returned is very sparse. You cannot easily see what a service does, whether it is...
Getting More Than 1000 Active Directory Results
By default, Active Directory returns only the first 1000 search results when you use an ADSISearcher. This is a security mechanism designed to...
Hiding Parameters from IntelliSense
Beginning with PowerShell 4.0, a script author can decide to hide function parameters from IntelliSense. This way, less frequently used parameters...
Finding Active Directory User Accounts Fast
The more specific your LDAP query is the faster and less resource intense the query is, and the more precise are the results as well. For example,...
Finding Active Directory Accounts by SID
If you know the SID and would like to find the corresponding Active Directory account, then LDAP queries won't work well. For them to work, you...
Searching in Different Domains
When you use the ADSISearcher type accelerator to find Active Directory accounts, it defaults to the current domain you are logged on to. If you...
Getting Domain from DN
A "DN" (Distinguished Name) is the path to an Active Directory object and could look similar to this:...
Converting Binary SID to String SID
Active Directory accounts contain the SID in binary form. To convert the byte array into a string representation, use a .NET function like this: #...
Finding Current Script Folder
Beginning in PowerShell 3.0, there is a very easy way of determining the folder a script is located in: $PSScriptRoot. This variable always holds...