By default, AD objects are protected from accidental deletion. To remove this protection for all objects in a given scope (i.e. all objects in an...
database-tools
First Steps Automating AD
When you download the free RSAT tools from Microsoft, these include the ActiveDirectory module. It contains a rich set of cmdlets to manage Active...
Changing Local Administrator Account Password
To access local user accounts and assign a new password, you can use the low-level WinNT: namespace. Note: you do need Administrator privileges to...
Encrypting Text
There are many ways to encrypt text. Here is an approach that does not use an explicit “secret”. Instead, the secret is defined as your...
Moving Outdated Log Files to Archive
Occasionally, you may want to move files to an archive folder when they are older than a given number of days. Here is an example that illustrates...
Part 1: Monitoring Analysis Services(SSAS) Performance
So you’re a DBA and your manager comes in and says that the BI team wants to install and configure an instance of Analysis Service. Oh and by the...
Create Benign “Task Kill” Application
In a previous tip we showed how you can select applications and kill them immediately. All unsaved data in the applications would get lost. Here is...
Create “Task Kill” Application
With just one pipeline command, PowerShell can open a list of running applications. You can then select one or more in the list (hold CTRL to select...
Open Web Page
To quickly open a new web page in the Internet Explorer, you could define a new function called Show-WebPage like this: #requires -Version 2...
Getting Active Directory User Name
Here is a quick way to find the current user in your Active Directory and retrieve account information such as the display name:...
Adding "List All Variables" to PowerShell ISE
In a previous tip we showed a script that would find all variable names in all scripts open in PowerShell ISE. Here is an adaption that adds a new...
Project Management in Rapid SQL – DBA and Developer Skill Sprints
In this Skill Sprint, Scott Walz covers how to manage projects in Rapid SQL. This functionality is also available in DBArtisan. Learn how to create...
Listing All Variables in All Scripts
Ever wanted an inventory of variable names used in all open scripts in the PowerShell ISE? Here is some code that you can run to create such a list:...
Quick Loop
Requires PowerShell 4.0 There are plenty of looping constructs in PowerShell. Here is a rather unusual way introduced in PowerShell 4.0 to repeat...
Analyzing (All) Event Log Entries
You probably know Get-EventLog. This cmdlet can dump all entries from a given event log: Get-EventLog -LogName System However, Get-EventLog can only...
Finding the Most Important Event Log Error Sources
If you don't have much time yet would like to know what the most common sources of errors are in your System event log, try this line:...
Video: DBArtisan for the DBA
This is an overview of Embarcadero DBArtisan from the DBA and Developer Skill Sprints webinar series. Scott Walz highlights some of the features...
IDC Technology Spotlight: Enabling Enterprise Agility Through Model-Driven Data Design
IDC Technology Spotlight: Enabling Enterprise Agility Through Model-Driven Data Design There is a growing need to build and integrate databases with...
Refresh Newly Mounted Disks
If your script has just mounted a new drive, PowerShell may not immediately be able to access it (via Get-ChildItem, for example), because...
Load Cmdlets from PSSnapins
Most cmdlets these days are organized in modules. Modules were introduced in PowerShell 2.0. Their main advantage is copy&paste deployment (no...
DBA Triage Using Heatmaps
The word “triage” for me brings up images from MASH re-runs; or memories of emergency room visits with nurses quickly deciding whether you are...
Loading PowerShell Modules
All cmdlets live in modules or snap-ins. To see which modules are currently loaded, use Get-Module. In PowerShell 3.0 or better, most modules are...
Demystifying Macros with ER/Studio
In the webinar, Demystifying Macros with ER/Studio, Embarcadero Software Consultant Stanley Chan demonstrated how macros work in ER/Studio. He...
3 things you Need to Know About SQL Server Sequence
As we traverse through different versions of SQL Server, there are new enhancements that always make us learn for newer techniques. One such...