PowerShell $Profile: The six options and their precedence

There are a total of six different profiles than can be created in PowerShell by default. Four of them can exist that are applied to the PowerShell console:And four of them can also exist that are applied to the PowerShell ISE (Integrated Scripting Environment):Two of the profiles are the same between the PowerShell console and ISE which gives you a total of six possible profile combinations that can be used to load items Read more [...]
Posted in PowerShell | Tagged | Leave a comment

Renewed as a Microsoft MVP on Windows PowerShell for 2015

I received the official notification earlier today confirming that I've been renewed as a Microsoft MVP on Windows PowerShell for 2015: I would like to thank everyone who has helped me along the way! Here's to another year of writing more awesome blogs on this site as well as guest blogs for other sites, speaking at conferences and for user groups, and running the Mississippi PowerShell User Group. µ Read more [...]
Posted in PowerShell | Tagged | 2 Comments

Function to Import the SQLPS PowerShell Module or Snap-in

The SQL Server 2014 basic management tools have been installed on the Windows 8.1 workstation that's being used in this blog article. When attempting to import the SQLPS (SQL Server PowerShell) module on your workstation, you'll be unable to import it and you'll receive the following error message if the PowerShell script execution policy is set to the default of restricted:Import-Module : File C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\SQLPS\Sqlps.ps1 Read more [...]
Posted in PowerShell, SQL Server | Tagged , | Leave a comment

Walkthrough: An example of how I write PowerShell functions

A couple of days ago I posted a blog article titled "PowerShell function: Test-ConsoleColor provides a visual demonstration of the foreach scripting construct" and today I thought I would walk you through that function step by step since it's what I consider to be a well written PowerShell function. It starts out by using the #Requires statement to require at least PowerShell version 3 or it won't run. It also requires that the PowerShell Community Extensions module be installed since it uses Read more [...]
Posted in PowerShell | Tagged | 1 Comment

Video: PS C:\> Get-Started -With ‘PowerShell for SQL Server’

I presented a beginner level session for the PowerShell Virtual Chapter of PASS yesterday titled "PS C:\> Get-Started -With 'PowerShell for SQL Server'". The session is entry level PowerShell and designed for those people who haven't yet embraced PowerShell because I often hear "How do I get started with PowerShell"? My new answer: Watch this video. https://www.youtube.com/watch?v=R2sZa0pcgyE The first two thirds or so of the presentation is more or less generic because the basics for someone Read more [...]
Posted in PowerShell, SQL Server | Tagged , , | 1 Comment

PowerShell function: Test-ConsoleColor provides a visual demonstration of the foreach scripting construct

Test-ConsoleColor is a PowerShell function that I recently wrote to provide a visual demonstration of how to loop through a series of objects in PowerShell using the foreach scripting construct, not to be confused with the ForEach-Object cmdlet.http://youtu.be/bS3DRQNZNGI The Test-ConsoleColor function shown in this blog article can be downloaded from GitHub. µ Read more [...]
Posted in PowerShell | Tagged | 2 Comments

Using a .NET Enumeration for PowerShell Parameter Validation

I recently ran into an issue where I wanted to use the values from a .NET enumeration as the default values for a parameter. That was easy enough:Although the previous code met my initial requirements, I decided that I also wanted the user to be able to tab expand the values and to validate the values based on the list of colors found in the enumeration without a requirement of having to hard code the values. My first thought was to use the ValidateSet parameter Read more [...]
Posted in PowerShell | Tagged | 2 Comments

Get Started with PowerShell for Amazon Web Services

I recently had a guest blog article published on the Hey, Scripting Guy! Blog site on how to "Get-Started with PowerShell for Amazon Web Services". As referenced in that blog article, the custom PowerShell script module that I wrote for managing AWS storage gateway snapshots can be downloaded from GitHub. If you found that guest blog article interesting, I have another blog article that I've written on "Filtering by StartTime with the AWS PowerShell Cmdlets" that you might also be interested Read more [...]
Posted in AWS, PowerShell | Tagged , | Leave a comment

Presentation materials from the highest rated PowerShell session at SharePoint Saturday Nashville

This past Saturday, I presented a session titled "PS C:\> Get-Started -With 'PowerShell for SharePoint'" at SharePoint Saturday Nashville and I'm happy to say that it was the highest rated PowerShell session of the event! How do I know this? Because it was the only PowerShell session of the event :-). The code and slides that I used during my presentation can be downloaded from here. There are multiple scripts included in the zip file and only portions of each one was used during the actual Read more [...]
Posted in PowerShell, SharePoint | Tagged , | 1 Comment

Get-Started with PowerShell for SQL Server Webinar on Wednesday June 17th

Know of anyone who is interested in PowerShell but not sure how to Get-Started? Next Wednesday, June 17th (One week from today), I'll be presenting a session on how to "Get-Started with PowerShell for SQL Server" for the PowerShell Virtual Chapter of PASS: The presentation begins at 11am CDT / noon EDT and I hope you'll join me. This is a beginner (intro) level session which will be presented via a Webinar. Sign up here. Update 6/18/2015 The video and presentation materials from this Read more [...]
Posted in PowerShell, SQL Server | Tagged , | 3 Comments

Enough blog articles to read one a day for an entire year!

This blog article today represents a milestone on this blog site as it's blog article number 365. That means you could read one blog article on this site per day and it would take you an entire year to read all of the articles that are published on this site. I started blogging on this site back in 2009 which was approximately 6 years ago. You'll notice that I have twelve blog articles from September of 2009, but I actually started blogging earlier that year and copy/pasted many of those first Read more [...]
Posted in Uncategorized | 1 Comment

Learn how to Get-Started with PowerShell at SharePoint Saturday Nashville on Saturday June 6th

Know anyone who is interested in PowerShell but not sure how to Get-Started? I'm presenting a beginner session at SharePoint Saturday Nashville on Saturday, June 6th. Not a SharePoint person? Regardless of whether you're a SharePoint person or not, the basic fundamentals of PowerShell are the same so most of my session will apply even if you're not a SharePoint person. Don't have time to learn PowerShell? I hear a lot of people say that they just don't have time to learn PowerShell. Those Read more [...]
Posted in PowerShell, SharePoint | Tagged , | 1 Comment