Category Archives: PowerShell

Looking Up Email Addresses with PowerShell

A week or so ago Aaron Nelson put out a call for help on Twitter looking for anyone that could help with adding autocomplete for looking up an email address to a PowerShell forms application. The original request was to look up the user in the Global Address List (GAL) via Outlook but after some thought we decided to switch to looking up the recipients Active Directory (AD), allowing the search to work on machines that do not have Outlook installed…like servers. I will walk through both functions then provide a quick and dirty test application so you can try out the code for yourself.
Continue reading

Posted in PowerShell | Tagged , , , , , , | 3 Comments

How Do I Change SSRS Report Credentials with Powershell?

Ever had to change the login information for all reports in a particular folder? In my case I was going from SQL authentication to Windows authentication for 4 folders with 15-20 reports each. I had done this before, manually, but I broke a few reports and it took hours to complete. Having to do the whole thing a second time meant a script was in order. Continue reading

Posted in PowerShell | Tagged , , , | 2 Comments

Get Drive Space Including Mount Points

Today’s post is a quick one that came out of a conversation on Twitter. To make a long story short, somebody was having trouble with mount points filling up because they were not being caught by the current monitoring script. I offered to look up how my monitoring was figuring out this data and post it here. Continue reading

Posted in PowerShell | Tagged , , | 4 Comments

How Can I Quickly Script Out Replication?

This script takes a distribution server name and an output directory as parameters then works through all publications on each of the servers that connects to the distribution server, scripting them out. Continue reading

Posted in PowerShell, Utilities | Tagged , | 4 Comments

Where Do I Start with PowerShell?

This morning I set out to get some information about getting started in PowerShell for a coworker. Rather than spend a bunch of time searching for different sites I threw the question out to the SQL Community on Twitter via #SqlHelp. The response was so overwhelming that I decided I at owed it to the SQL Community to get it all written down. Continue reading

Posted in PowerShell | Tagged | 10 Comments

Script Individual User Rights in a Database with PowerShell

Introduction Tonight on Twitter the call went out on #SqlHelp looking for a way to script just database permissions for a specific user. I wrote a script once that I was pretty sure did that so I jumped in to … Continue reading

Posted in PowerShell | Tagged | 1 Comment