Checking and Setting the Start Mode of a Windows Service with PowerShell

Working with Services in PowerShell is probably one of the first tasks you'll undertake as a PowerShell newbie. Recently I needed to disable a few Windows services on a server and I'm a big believer in being able to get back to where you started so the first thing I set out to accomplish was to find out what the start mode was of the services I needed to change. My demo machine doesn't have those particular services I referenced so the BITS service will be used for the demonstration in this scenario:By Read more [...]
Posted in PowerShell | Tagged | Leave a comment

Exploring the Find-Package Cmdlet from the PowerShell version 5 Preview OneGet Module

While presenting on the OneGet Module in the preview version of PowerShell version 5 for the Mississippi PowerShell User Group last week I discovered a couple of things about the Find-Package cmdlet that I wanted to share. The first thing is wildcards don't work with the name parameter:That's seems to be because they're already performing a wildcard search as I'll search for 'Java' in the following example and notice that none of the packages are that exact Read more [...]
Posted in PowerShell | Tagged , | 1 Comment

One Month Until Microsoft TechEd North America 2014!

I've attended Microsoft TechEd North America every year consecutively for the past four years and this year will make five years in a row that I've attended. If there's a specific technology you're interested in, there are precons on the Sunday prior to TechEd for an additional fee that are a really good value. I've attended Exchange, SharePoint, and SQL Server precons at TechEd in the past.  Todd Klindt who is a SharePoint MVP is doing a SharePoint precon again this year. I attended a previous Read more [...]
Posted in Career Development, Microsoft TechEd | Tagged , | 1 Comment

Return an Error Message from a Remote Computer when an Attempt to Install a Package using the OneGet Module Fails

This blog article will walk you through the issue of the OneGet module not returning an error message when an attempt to install a package fails on a remote computer via the Install-Package cmdlet and PowerShell remoting. Attempting to install a package such as WireShark on a remote computer gives you a quick flash across the screen that's too quick to read and then it gives your prompt back with no errors and no feedback about whether or not the package was installed:Checking Read more [...]
Posted in PowerShell | Tagged , | Leave a comment

Getting Installed Packages InSync Across Multiple Machines with the PowerShell version 5 Preview OneGet Module

I presented a session for the Mississippi PowerShell User Group a couple of days ago and I thought I would share a couple of things I showed during that presentation that I hadn't previously blogged about. I'm starting where I left off during my last blog article about the OneGet module in the PowerShell version 5 preview. I've stored the names of the packages that are installed on the local computer (PC03) in a variable named Software and created PSSessions to three remote computers (PC04, Read more [...]
Posted in PowerShell | Tagged , | Leave a comment

Less than one week left before Registration closes for the PowerShell Summit North America 2014!

I attended the PowerShell Summit North America 2013 last year so I speak from experience when I say that the PowerShell Summit North America 2014 is a conference that you don't want to miss and it's the best value that you'll find in a PowerShell related conference this year <period>. Last year the Summit was smaller with a very limited number of tickets available which sold out well before the end of 2012 and there were a lot of people who missed out. Well, this year you're in luck, Read more [...]
Posted in PowerShell, PowerShell Summit | Tagged , | Leave a comment

Using the PowerShell version 5 Preview OneGet Module with PowerShell Remoting

I'm picking up where I left off in my last blog article. Adobe Reader, ImgBurn, and WinRAR have been installed on a Windows 8.1 Enterprise edition computer named PC03. All of the examples shown in this blog article are being run from the PC03 computer. I'll use a little trick I showed you a few blog articles ago and store the names of the installed packages in a variable and return them at the same time, all in a one-liner:I'll create a PSSession to the Read more [...]
Posted in PowerShell | Tagged , | 1 Comment

Installing Software with the OneGet Module in PowerShell version 5

As referenced in my previous blog article, a preview version of PowerShell version 5 was released last week. One of the new modules is named "OneGet" which contains a number of new PowerShell cmdlets:There's only limited help available for these cmdlets since attempting to update the help fails for the two new modules that are part of the PowerShell version 5 preview:Update-Help : Failed to update Help for the module(s) Read more [...]
Posted in PowerShell | Tagged , | 3 Comments

How to Install the Preview Version of PowerShell Version 5

The Windows Management Framework v5 Preview was announced and released a few days ago (on April 3, 2014) which includes a preview version of PowerShell version 5. Be sure to read through the System Requirements on the actual download page before attempting to install this preview version because it's not recommended to be installed at this time on systems with certain software installed such as Exchange Server 2007. I didn't see this stated on the download page and I think it goes without saying, Read more [...]
Posted in PowerShell | Tagged | 1 Comment

Where and Foreach Methods in PowerShell version 4

It's a little over a month until Microsoft TechEd North America 2014 which is in Houston this year. I was trying to remember the cool stuff I saw at TechEd last year and Desired State Configuration along with the announcement about PowerShell version 4 were the two big things I remember, but let's not forget about some of the other things such as the new Where and Foreach methods. I certainly don't claim to be an expert with these, but I'm going to provide a couple of examples for documentation Read more [...]
Posted in PowerShell | Tagged | 1 Comment

PowerShell: Output the Result of a Command and Assign it to a Variable in One Line

As of today, there is one month left until the PowerShell Summit North America 2014. I tweeted something out last night and thought I would write a quick blog about it since I often find myself looking for a tweet months later when I can't remember how I did something that I previously tweeted out. This tweet used all 140 characters that twitter allows:This portion of the command is assigned to a variable named $i (technically it's assigned to a variable Read more [...]
Posted in PowerShell, PowerShell Summit | Tagged , | 1 Comment

Run a local PowerShell Function against a Remote Computer with PowerShell Remoting

Did you know that it's super easy to run a function that exists only on your local computer against a remote computer even when no remoting capabilities have been added to the function itself? It does however require that PowerShell remoting be enabled on the remote system, but if you're running Windows Server 2012 or higher, PowerShell remoting is enabled by default on those operating systems. I'll start off by creating a function that performs a meaningful task so I can use it to demonstrate Read more [...]
Posted in Active Directory, PowerShell | Tagged , | 4 Comments