This small piece of code prompts for a new registered owner name, then updates the value in the Windows Registry. Note that this requires...
database-tools
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
Downloading Files
Invoke-WebRequest can download files from the internet for you. This example downloads a 33MB public NASA video to your computer, then starts to...
Using Hash Table as Conditional Code Repository
It is routine for scripts to check whether a folder exists, and if it is missing, to create it: #requires -Version 1 $path = 'c:\testfolder'...
Why Invoke-Expression is Evil
Invoke-Expression takes any string and treats it as PowerShell code. This way, you could construct dynamic code, and then execute it....
Accessing Web Page Content
Beginning with PowerShell 3.0, the cmdlet Invoke-WebRequest can download web page content quite easily. This would scrape all links from...
Analyzing svchost Processes
Occasionally, you may see a bunch of processes named "svchost" in your task monitor or Get-Process output. These processes are hosts for Windows...
Identifying Services by ProcessID
Group-Object is a great cmdlet to create lookup tables. If you wanted to identify a Windows service by its process ID, here is a way: $serviceList =...
Creating Real Classes
PowerShell introduces class support in PowerShell 5.0, but you can define your own classes in other PowerShell versions as well. Simply use C# code...
Adding Test Hosts to PowerShell ISE
To quickly open new test hosts inside the PowerShell ISE that ships with PowerShell 3.0 and better, here is a small helper function: #requires...
Metadata Market Study Report
Recently, the Competence Center Corporate Data Quality (CC CDQ, a European consortium research program) engaged with Fraunhofer Institute for...
Using PowerShell Tabs in the PowerShell ISE
The PowerShell ISE shipping with PowerShell 3.0 and better is actually a multi-host. It can host multiple separate instances of PowerShell. To add a...
Defining Default Parameters
PowerShell can define defaults for any parameter, so if you wanted to always submit a default value for Get-ChildItem‘s –Path parameter,...
Outputting and Assigning at the Same Time
If you’d like to assign the results of a command to a variable, and at the same time output the results, too, here are two approaches. You can...
Common Parameters and Optional Common Parameters
Cmdlets and advanced PowerShell functions can have their own parameters, but they also always inherit common parameters. To see a list of common...
Setting up Oracle for Embarcadero ER/Studio – Part 2
Howdy! Welcome to the next installment of the series. In today's series, we will explore the options for Oracle Client Setup needed for ER/Studio. ...
Displaying Object Properties One per Line
Sometimes you may want to get a good overview of the data contained in an object. For example, if you query the PowerShell process and display it in...
Setting up Oracle for Embarcadero ER/Studio – Part 1
In this blog post, I will be covering how easy it is for one to setup Oracle, in order to successfully work with Embarcadero's leading...
Data Modeling Tip for DBAs – by John Sterrett
Database Administrators (DBAs) are given so many different tasks from creating maintenance plans, upgrading databases, fighting performance...
Listing (and Checking) PowerShell Profiles
Profile scripts are PowerShell scripts that launch automatically once PowerShell starts. The path to the primary profile file can be found in...
Creating New Objects – Oneliner
Sometimes you may want to create your own objects to store multiple pieces of information. Here is a pretty dense oneliner that illustrates a quick...
7 Dangerous Myths DBAs Believe about Data Modeling
How much does your DBA really know about data modeling? Data modeling can simplify routine tasks and provide valuable context for a database...
Aggregating Logs And Monitoring Them With up.time and logstash
Log monitoring is an important part of understanding your systems’ and applications’ health and are a valuable tool for troubleshooting...
Mapping Network Drives (Part 3)
If you migrated from VBScript to PowerShell, you may remember how VBScript mapped network drives. This option is still available in PowerShell....
Mapping Network Drives (Part 2)
Beginning with PowerShell 3.0, you can use New-PSDrive to map network drives. They will be visible in File Explorer as well. Here is some sample...
Mapping Network Drives (Part 1)
PowerShell supports console commands, so if you need to map a network drive, often the most reliable way is to use good old net.exe like this:...
Executing with Timeout
Start-Process can start processes but does not support a timeout. If you wanted to kill a runaway process after a given timeout, you could use an...
Executing Selected Code as Admin
If you need to run selected parts of your script with Administrator privileges, you could temporarily launch a second PowerShell with Administrator...
Finding Drive Letters
Here is a simple function to find out the reserved drive letters: #requires -Version 3 function Get-DriveLetter { (Get-WmiObject -Class...
Quickly Setting Multiple Environment Variables
To quickly (and permanently) set a bunch of environment variables, here is a nice approach: $hashtable = @{ Name = 'Weltner' ID = 12 Ort =...
Quickly Finding Scripts
To quickly locate a PowerShell script anywhere in your MyDocuments folder, take a look at this Find-Script function: #requires -Version 3 function...