Do you consider yourself a PowerShell person? If you haven't heard, there's a new online directory of the PowerShell community called PowerShell People. The site is a place to find other PowerShell enthusiast's blogs, webs sites, twitter feeds, and other items they've chosen to share. What's needed to get a profile page on the PowerShell People community site? Simply a knowledge of PowerShell. You heard me correctly, a knowledge of PowerShell is the only prerequisite for creating a PowerShell People Read more [...]
In my last blog article on this subject, I showed how to copy the PowerShell module manifest file from a server with the module you want to download the help for to the local computer to trick it into thinking the module was installed locally, but copying files can get messy and isn't really a robust way of accomplishing that task. The first method I used did get me thinking about this process though. If all the Save-Help cmdlet does is to look for the Module manifest file somewhere in the PowerShell Read more [...]
There are a couple of PowerShell book giveaways going on that you may be interested in: PowerShell Magazine is giving away a copy of "Microsoft Windows PowerShell 3.0 First Look" written by Adam Driscoll. Alvin Ashcraft's Morning Dew is giving away two copies of "Learn Windows PowerShell 3 in a Month of Lunches, Second Edition" written by Don Jones & Jeffery Hicks. µ Read more [...]
The Scripting Guy (Ed Wilson) will be presenting at the Arizona PowerShell Users Group today, Wednesday November 7th from 3:30 to 5pm MST (Mountain Standard Time). If you can't be there in person, here's a link to the Arizona PowerShell Users Group page where the information to join the Lync online meeting is posted. I attended last month's online meeting and you'll want the Microsoft Lync 2010 Attendee fat client (not the web client). The fat client is the only way I found to hear the audio during Read more [...]
Update-Help and Save-Help are new PowerShell version 3 cmdlets which allow you to initially download PowerShell help and keep the local PowerShell help files updated that are installed on your computer and available via the Get-Help cmdlet. In PowerShell version 3, Save-Help allows the updated help files to be saved to a location where a machine that doesn't have Internet access can update it's help from. The problem is that in order to save help for a module, that module has to exist on the local Read more [...]
I've had a lot of irons in the fire this year and haven't had time to dedicate to taking any certification tests year to date. This year, I've spent much of the time that I would have normally spent studying for certification tests, learning PowerShell instead. I competed in the Scripting Games earlier in the year. I finished in third place in the beginner class and lead the beginner class for more than half of the games: I attended several technology events as I normally do each year, but this Read more [...]
You've decided to install PowerShell version 3.0 on your computer. Your computer meets the requirement of running Windows 7 with Service Pack 1, Windows Server 2008 with Service Pack 2, or Windows Server 2008 R2 with Service Pack 1. If you're running Windows 8 or Windows Server 2012, you already have PowerShell version 3.0 installed. There are several different ways to check the operating system version and service pack level. In the following screenshot, I've run "winver.exe" and I can see that Read more [...]
It's definitely beneficial to attend technology events so you can talk to other IT Pro's. This past weekend I presented a session at PowerShell Saturday in Atlanta and while at the speaker dinner I made a comment about a new version of the PowerShell Community Extensions being released. The only cmdlet that's part of that module that I use all of the time is Out-Clipboard which allows you to paste the output of a PowerShell command into notepad, Word, an email, etc: Brian Wilhite, another PowerShell Read more [...]
This past Saturday, I presented a session at PowerShell Saturday 003 in Atlanta. Towards the end of the presentation, I created 290 Active Directory user accounts by using the information for employees contained in the Adventure Works 2012 database. This is actually a PowerShell script that I whipped up Friday night at the hotel after the speaker dinner. I populated some demographic information by joining multiple tables together from that particular database. There is more demographic information Read more [...]
I'll be speaking this Saturday, October 27th at PowerShell Saturday 003 in Atlanta. My session is officially titled "PowerShell Fundamentals for Beginners". A guest blog that I wrote about PowerShell, my session, and the event was published yesterday on the Hey, Scripting Guy! Blog at Microsoft TechNet so take a look at it and the brief description of my session on the PowerShell Saturday 003 website for more details. It's getting close to Halloween so I picked up some special treats in the New Read more [...]
I'm a big fan of the online version of PowerShell help. I also use Google Chrome as my default web browser. Since I've moved to Windows 8 and PowerShell 3.0, using the Get-Help PowerShell cmdlet with the Online parameter generates an error. There's actually two different errors that I've seen a lot of, the first one is because the online help doesn't appear to exist and this error occurs regardless of what web browser you're using: Get-Help : The online version of this Help topic cannot be Read more [...]
You have a fresh installation of Windows Server 2012 that was installed using the default installation type of server core installation (no-GUI). This server will be the first domain controller in a brand new Active Directory forest. Log into the server and launch PowerShell by typing "powershell.exe". You'll need to first add the AD-Domain-Services role to the server:
The installation of this role completes and a restart is not required: Now to make Read more [...]
Use PowerShell to obtain a list of currently running processes where the executable file has been modified in the past 90 days. The number of days is a parameterized value so it can be specified when running the script without having to manually modify the script each time you want to change the value. The script uses a foreach loop to iterate through each individual process that is returned by the Get-Process cmdlet. The process's path property must contain a value or it will not be listed. Each Read more [...]
I posted a blog yesterday about a PowerShell issue I was experiencing and the problem ended up being due to the new PowerShell version 3 Where-Object Syntax producing different results than the PowerShell version 2 Where-Object syntax. Piping Get-Volume to Where-Object and filtering on the drive letter using the version 3 syntax appears to be case sensitive. It doesn't return results when using a lower case 'c':
Using the PowerShell version 2 syntax with Read more [...]
Get-Volume | where DriveLetter -eq 'C'
Get-Volume | where DriveLetter -eq 'c'
While doing some testing on my Windows 8 machine today, I discovered an issue where Filtering Left could produce different results than filtering with the Where-Object cmdlet. Nothing special here. Just using the Get-Volume cmldet and filtering left with its DriveLetter parameter. Using either an upper or lowercase 'C' returns the same results:
Using the Where-Object cmdlet to do the filtering, while not a best practice when the filtering can be accomplished Read more [...]
Get-Volume -DriveLetter 'C'
Get-Volume -DriveLetter 'c'
You have an Active Directory user account and you want to make a second user a member of the same groups without removing the second user from any groups they may already be a member of. I prefer using the Quest PowerShell Cmdlets for Active Directory for doing my AD administration work. They have been downloaded and installed on the system this is being run from. The Quest snap-in has been added to make the cmdlets available. User 'afuller' is a member of several groups in this active directory Read more [...]