Deploy Desired State Configuration Resources with an SMB based Pull Server

So you've either downloaded DSC resources from GitHub or you've created some DSC resources of your own and the LCM (Local Configuration Manager) on the servers in your environment is set to use an SMB based DSC pull server. To automatically deploy those custom resources with an SMB pull server, they need to be zipped up including their base directory and named "ResourceName_Version.zip". For example, the xSmbShare DSC resource that can be download from GitHub would be named "xSmbShare_1.0.zip". Read more [...]
Posted in Desired State Configuration, PowerShell | Tagged , , | Leave a comment

Create a DSC SMB Pull Server with DSC and separate the Environmental Config from the Structural Config

On Saturday May 16th, I'll be presenting a session titled "PS C:\> Get-Started -With 'PowerShell Desired State Configuration'" at SQL Saturday #392 in Atlanta. One of the things I'll be demonstrating is a SMB based DSC Pull Server and I figured since it's a DSC presentation, why not create it with DSC, right? The machines used in this blog article are running Windows 8.1 and Windows Server 2012 R2. Both have the default version of PowerShell installed that shipped with those operating systems Read more [...]
Posted in Desired State Configuration, PowerShell | Tagged , , | Leave a comment

Change the Recovery Model of a SQL Server database with the PowerShell SQL PSProvider

I recently set out to change the recovery model of a SQL Server database with PowerShell. There seems to be lots of information available on how to accomplish this task with PowerShell through SMO (SQL Server Management Objects) and using T-SQL wrapped inside the Invoke-Sqlcmd cmdlet. I even found lots of information about how to view the recovery model with the PowerShell SQL Server PSProvider, but when it came to actually changing the recovery model via the PSProvider, there was little if any information Read more [...]
Posted in PowerShell, SQL Server | Tagged , | 1 Comment

PowerShellGet: The BIG EASY way to discover, install, and update PowerShell modules

On Tuesday of this week, I presented a session at the PowerShell Summit North America 2015 with the same title as this blog article. The video of my session is now available on PowerShell.org's YouTube channel: The code and slides from the presentation can be downloaded from here. µ Read more [...]
Posted in PowerShell, PowerShell Summit | Tagged , , | 2 Comments

Free eBook on PowerShell Advanced Functions

Recently, a team of independent bloggers who are active in the PowerShell community teamed up to bring you a series of blog articles on advanced functions via an experiment called PowerShell blog week. Those blog articles have now been complied into a free eBook and are downloadable in all of the popular eBook formats. A zip file containing the PDF, MOBI, EPUB, and AZW3 formats can be downloaded from here. Prefer to read the PowerShell Blog Week articles online instead of downloading the Read more [...]
Posted in PowerShell | Tagged , | Leave a comment

PowerShellGet Session at the PowerShell Summit NA 2015

The PowerShell Summit North America 2015 is next week! I'll be presenting a session on PowerShellGet at 2:30pm on Tuesday, April 21st in the room named Kilimanjaro. The official title for my session is: PowerShellGet: The BIG EASY way to discover, install, and update PowerShell modules The abstract (or synopsis) for my session will give you a little information about what I plan to cover during the presentation: What process do you currently have in place for sharing PowerShell modules Read more [...]
Posted in PowerShell, PowerShell Summit | Tagged , , | 1 Comment

Filtering by StartTime with the AWS PowerShell Cmdlets

I was recently trying to figure out how to return an AWS Storage Gateway snapshot by providing a value for the StartTime property and it wasn't easy to say the least so I thought I would share my experience to save others the headache of figuring it out. Most of the tutorials you'll find online show filtering something similar to this:You could also use multiple hash tables as shown in the following example:Viewing Read more [...]
Posted in AWS, PowerShell | Tagged , | Leave a comment

PowerShell Advanced Functions: Can we build them better? With parameter validation, yes we can!

This blog article is the second in a series of blog articles that is being written on PowerShell advanced functions for PowerShell blogging week. If you haven't already read the first article in this series: "Standard and Advanced PowerShell functions" written by PowerShell MVP Francois-Xavier Cat, I recommend reading it also. What is parameter validation? In PowerShell, parameter validation is the automated testing to validate the accuracy of parameter values passed to a command. Why validate Read more [...]
Posted in PowerShell | Tagged , | 6 Comments

The mother of all PowerShell blogs week is coming next week!

Next week, beginning on Monday March 30th, a group of PowerShell MVP's and/or enthusiasts who write PowerShell related blog articles on a consistent basis will team up to publish a week long series of blog articles on their sites or the site where they blog at. This isn't a spoiler alert so I'm pleading the fifth when it comes to the details of those blog articles, but based on what the team has already made public, I can tell you that they're all on one central topic and that topic is PowerShell Read more [...]
Posted in PowerShell | Tagged , | 1 Comment

Create a New Empty File with the PowerShell Out-File Cmdlet

A few weeks ago I was setting up OpenSSL on a Windows machine and I was following a Linux tutorial which used the "touch" command to create a new empty file. To accomplish the task of creating a new empty file with PowerShell, the most straight forward way is to use the New-Item cmdlet:I inadvertently discovered another way to create a new empty file with PowerShell which I thought I would share with you guys, the readers of my blog. You may see some Read more [...]
Posted in PowerShell | Tagged | 1 Comment

Use PowerShell to Create a Linux VM in Azure

In a couple of my previous blog articles, I've demonstrated how to create a storage account in Azure and how to create a reserved virtual IP address in Azure. Both of those items will be used in today's blog article so I recommend reading through those previous blog articles if you haven't already done so. The goal in this blog article is to build a CentOS based OpenLogic 7.0 VM in Azure except using PowerShell instead using the Azure portal website (GUI): First, the name of the image that Read more [...]
Posted in Azure, CentOS, Linux, PowerShell | Tagged , , , | Leave a comment

Automatically create a checksum and publish DSC MOF configuration files to an SMB pull server

You've configured one or more DSC (Desired State Configuration) SMB pull servers in your environment. You've also configured the target nodes appropriately. One problem that seems to be a constant problem in your environment when authoring and updating DSC configuration files (MOF files) is keeping track of what GUID belongs to which machine and it's also a common problem to forget to update the corresponding checksum when a configuration file is updated. Last week, you spent an entire day troubleshooting Read more [...]
Posted in Desired State Configuration, PowerShell | Tagged , , | Leave a comment