Sometimes you might want to check the digits of an integer, i.e. to validate user input. Here is a really simple way using regular expressions: #...
database-tools
How Can SQL Workload Analysis Help You?
To find the key points of how SQL Workload Analysis can help you, look for the ducks throughout this blog post! What Is SQL Workload...
Opening PowerShell Inside Explorer
A quick way of opening PowerShell is to launch Windows Explorer, navigate to the folder with your data, then click into the navigation bar. The...
Hiding Progress Bars
Some cmdlets and scripts use progress bars to indicate progress. As you learned in the previous tip, progress bars cause delays, so if you...
Using a Progress Bar Wisely
PowerShell comes with support for progress bars. Here is a very simple example: 1..100 | ForEach-Object { Write-Progress -Activity...
Coming Soon! Uptime Infrastructure Monitor 7.8…here's a little taste
Monitoring for Hyper-V virtual machines Monitoring of Microsoft Hyper-V virtual machines directly through Hyper-V API is now supported in Uptime...
Bulk Renaming Photos
Here is a quick and fast way to bulk-rename files like photos, or other files. Have a look: #requires -Version 1.0 $Path = "$home\Pictures" $Filter...
Identifying Locked AD Accounts
When searching for specific AD accounts, you may have used Get-ADUser in the past, and filtered results with a filter parameter. Such filters can...
Exploring Local Account Management Cmdlets
PowerShell 5.1 (shipping with Windows 10 and Server 2016) can now natively manage local accounts. In the previous tip you learned how to use...
Managing Local Users
PowerShell 5.1 finally ships with cmdlets to manage local user accounts. To get a list of local user accounts, use Get-LocalUser and pipe the result...
Getting AD User Attributes
By default, Get-ADUser (provided by ActiveDirectory module which is part of the free Microsoft RSAT tools) retrieves only a few default properties....
Why Database Backup Compression Is Better Than Deduplication
I often run into situations where DBAs are having discussions with their Storage Administrator around not compressing database backups so that they...
Happy National Rubber Ducky Day!
Our favorite holiday is almost here! National Rubber Ducky Day is Friday, January 13. To help celebrate this holiday we are sending you our newest...
Careful with Get-Credential and SecureStrings
Sometimes, scripts interactively ask for credentials, or passwords. Always be aware that the script author can get to the plain text of all entered...
Managing Credentials (Part 5)
When PowerShell auto-encrypts a secure string, it uses your identity as secret. Only you can decrypt the secure string. What if you want to encrypt...
The Value of Data Modeling
How do you convince your management that data models are worth the time and effort they require? You may be dealing with challenges around the value...
Managing Credentials (Part 4)
In the previous script we showed how you can save a credential object in encrypted form to disk. A similar approach just saves the secret password...
2017: A New Year with new projects?
2017: A New Year with new projects? I’m not big into new year’s resolutions. Too often they are just words that we never act on. When...
Managing Credentials (Part 3)
For unattended scripts, it is generally unsafe and not recommended to hard-code secret passwords into a script. As an alternative, you could ask for...
Managing Credentials (Part 2)
For scripts running unattended, you can create login credentials from code. This requires the secret password to be saved as clear text in a script...
Storage Performance Optimization, I/O Efficiency
Over time, the blocks in a relational database will typically contain fewer and fewer rows of data making each I/O operation less efficient. ...
How to Run PowerShell Scripts with Uptime Infrastructure Monitor
Introduction Microsoft PowerShell is an automation platform and scripting language for Windows and Windows Server that allows you to simplify the...
Managing Credentials (Part 1)
Let’s assume you need to run a script every day that requires credentials. A safe way of storing credentials is to save them encrypted in a...
Parsing Raw Text (Part 3)
In the previous tip we illustrated how you can use Select-String to find lines in raw text containing a specific word. It took some effort to...