All PowerShell versions If your computer has a sound card, here is a code snippet that will drive your colleagues nuts: function prompt { 1..3 |...
database-tools
SQL Heatmap is here – Idera’s newest free tool
Idera strives to bring helpful tools to the market for DBAs and Developers to complete daily tasks and a variety of these are free. Today we...
Returning More Than One Value
All PowerShell versions If a PowerShell function needs to return more than one value, best practice is to return objects, and store the information...
Edit Network “hosts” File
All PowerShell versions If you find yourself editing the “hosts” file regularly, then it may be tedious to manually open the file in an...
Watch Out With UNC Paths!
All PowerShell versions Many cmdlets can deal with UNC paths, but using UNC paths can produce flaky scripts. Take a look at this: PS> Test-Path...
Finding AD Users
All PowerShell versions Searching the AD can be done with simple calls provided you are logged on an Active Directory domain. In a previous tip we...
Finding and Dumping Registry Key Paths
All PowerShell versions In a previous tip we illustrated how to convert an internal PowerShell path format to a real path. Here is a use case. This...
Seven Deadly Sins of Database Design
If you don’t get the data right, nothing else matters. However, the business focus on applications often overshadows the priority for a...
Solution: How to register SQL2014 in Defrag if it does not support this version?
I have registered SQL 2008, SQL2012 in my Defrag to monitor them. Then I tried to register SQL Server 2014 instance too. Defrag cannot register it...
Correcting PowerShell Paths
All PowerShell versions Occasionally, you might stumble across strange path formats like this one:...
Quickly grouping events in SQL XEvent Profiler
As you may know, Idera has a number of free tools for SQL Server and we’re always coming out with new ones. Earlier this year we debuted SQL...
Case-Correct Name Lists
All PowerShell versions Let’s assume it’s your job to update a list of names. Here is an approach that will make sure that only first letter in a...
Survey: Oracle in your environment
A recent survey indicated a significant number of our customers use Oracle in their environment. Please help us better understand how we can help...
Hibernate System
All PowerShell versions Here is a simple system call that will hibernate a system (provided of course that hibernation is enabled): function...
Recursing a Given Depth
PowerShell 3.0 and newer When you use Get-ChildItem to list folder content, you can add the –Recurse parameter to dive into all subfolders....
Managing Printers Low-Level
All PowerShell versions Recent Windows operating systems like Windows 8 and Server 2012 come with great printing support, but if you run older...
Precise for web shows only a location of All
You may notice that in Activity tab in Precise for web your location data only shows a Location Name for All. Although Precise is designed to show...
Aliases Can Be Dangerous
All PowerShell versions Aliases enjoy the highest priority among executable commands in PowerShell, so if you have ambiguous commands, PowerShell...
Converting Special Characters, Part 2
All PowerShell versions In a previous tip we illustrated how you can replace special characters in a text. Here is another approach that may be a...
Converting Special Characters, Part 1
All PowerShell versions Sometimes it becomes necessary to replace special characters with other characters. Here is a simple function that does the...
Test-Driving Scripts without Aliases
All PowerShell versions Aliases can be cool in interactive PowerShell but should not be used in scripts. In scripts, use the underlying commands (so...
Delete Aliases
All PowerShell versions While you can easily create new aliases with New-Alias or Set-Alias, there is no cmdlet to delete aliases. PS> Set-Alias...
Finding AD Accounts Easily
All PowerShell versions You do not necessarily need additional cmdlets to search for user accounts or computers in your Active Directory. Provided...
Loading Functions from Separate File
PowerShell 3.0 and newer To keep things simple, you may want to put PowerShell functions into a separate file. To load these functions into your job...