Announcing the General Availability of IDERA SQL Safe Backup 9.3
Categories
- Free tools
- SQL Admin Toolset
- SQL Compliance Manager
- SQL Defrag Manager
- SQL Diagnostic Manager for MySQL
- SQL Diagnostic Manager for SQL Server
- SQL Diagnostic Manager Pro
- SQL Doctor
- SQL Enterprise Job Manager
- SQL Inventory Manager
- SQL Query Tuner for SQL Server
- SQL Safe Backup
- SQL Secure
- SQL Workload Analysis for SQL Server
- Uptime Infrastructure Monitor Formerly Uptime
Shortening Parameter Arguments in PowerShell 3.0
In PowerShell 3.0, when a parameter expects a fixed list of values, you do not need to write the complete argument. It is OK to write just as much as is needed to uniquely identify the argument: Write-Host 'This is a colorful message' -ForegroundColor r...
Resolving URLs
Sometimes you may stumble across URLs like this one: http://go.microsoft.com/fwlink/?LinkID=13517 As it turns out, these are just "pointers" to the real web address. In PowerShell 3.0, the new cmdlet Invoke-WebRequest can resolve these URLs and return the...
Validating Active Directory User Account and Password
Ever wanted to check whether a given user account and password was correct? Here is a little function that can help you: function Test-ADCredential { param( [System.Management.Automation.Credential()] $Credential ) Add-Type -AssemblyName...
Working With TimeSpan Objects
TimeSpan objects represent a given amount of time. They are incredibly useful when you calculate with dates or times because they can represent the amount of time between two dates, or can add a day (or a minute) to a date to create relative dates. Here are some...
Converting Low-Level Error Numbers into Help Messages
Sometimes, native commands such as net.exe return cryptic error numbers instead of full error messages. Traditionally, you could use the following command to convert these error numbers into full messages: PS> net helpmsg 3534 The service did not report an error....
Identifying 32-bit Executables
Thanks to Shay Levy from http://powershellmagazine.com for showing how to do this: here's a small function that returns the architecture an executable was compiled for: function Get-FileArchitecture { param ( $filePath = "$env:windir\notepad.exe" )...
Creating String Arrays without Quotes
Often, you may need a list of strings and want to store it in a variable. The common coding practice is like this: $MachineType = 'Native','I386','Itanium','x64' A much easier approach does not require quotes or commas. It simply...
Discover New "Internet"-Cmdlets in PowerShell 3.0
With Invoke-WebRequest and Invoke-RestMethod, PowerShell 3.0 now has powerful support for downloading information from the Internet as well as communicating with Internet services. We have had a number of tips on these in the past. Some people use Invoke-WebRequest to...
Using Help Window as Text Dialog
Did you know that you can use the Help Window that comes with PowerShell 3.0 and display your own text information inside of it? What's even better: the help window will support full text searches in the text you display and highlight any matching text, just like...
Using Default Parameter Values
If you find yourself submitting the same value for a cmdlet parameter over and over again, then PowerShell 3.0 lets you set a default value. Once you defined a default value for a parameter, you no longer need to specify it. This can be very convenient in production...
Find Matching Brace (or Parenthesis)
One common headache are non-matching braces or parentheses in PowerShell scripts. So when you write a script, it is recommended to align matching braces and parentheses and make your code more readable this way. In addition, PowerShell 3.0 ISE editor helps identify...
Using Central ISE Snippet Repository
In a previous tip we illustrated that ISE code snippets (press CTRL+J to view them) are plain ps1xml-files that you can manage in File Explorer. By default, the PowerShell 3.0 ISE editor loads snippets from your private cache folder. Imagine you and your colleagues...
Sharing and Exchanging ISE Code Snippets
By default, the PowerShell 3.0 ISE editor loads code snippets automatically, and you can then select and insert any of these by pressing CTRL+J. Custom code snippets are stored in a special folder that you can open like this: $snippetPath = Join-Path (Split-Path...
Hiding Default ISE Snippets
The PowerShell 3.0 ISE editor ships with a number of default code snippets that you can see (and insert) by pressing CTRL+J. Once you start to refine your snippets and create your own (New-IseSnippet), you may want to hide the default snippets. This line will remove...
Removing ISE Snippets
In a previous tip, we showed how you can use New-IseSnippet to add new code snippets to the ISE editor in PowerShell 3.0. These custom snippets stay permanently because PowerShell creates XML files for them. You can view these files with Get-IseSnippet: Get-IseSnippet...
Adding Custom Snippets to ISE editor
The new PowerShell 3.0 ISE editor features a snippet menu that lets you easily insert predefined code snippets. Simply press CTRL+J to open the menu, select the snippet, and insert it into your code. To add more snippets, here is the way to go: $myCodeSnippet=@'...
Using Here-String Correctly
Whenever you need to assign multi-line text to a variable, you can use so-called here-string. This is a sample: $myCodeSnippet=@' function Verb-Noun { param() } '@ Anything in between the quotes is untouched by the PowerShell parser and can contain any...
Using Regions in ISE Editor
PowerShell 3.0 ISE editor creates collapsible regions automatically, so you can collapse a function body or an IF statement. In addition, you can add your own custom collapsible regions like this: #region Get-Process #endregion Make sure you type the region comment...
Accessing Latest Log File Entries
Sometimes you may just be interested in the last couple of entries in a log file. Here’s a simple yet fast way of outputting only the last x lines from a text log: # Show last 5 lines of windowsupdate.log file $logs = Get-Content -Path $env:windir\windowsupdate.log...
Finding IP GeoLocation Data
In a previous tip we illustrated how you can use web services to retrieve information such as public holidays or the location of an IP address. Often, you can get the very same information by contacting websites that provide XML results. Once you know such sites, you...