Articles

PowerShell articles, tutorials, and guides from community experts.

Don Jones
Training

Calling all PowerShell Teachers/Trainers

I’m in the process of building a referral list for teachers and trainers who work with Windows PowerShell. My goal is to build a “find a trainer” page here on PowerShell.org, with the ability for prospective clients to send an inquiry via email. This would be for customers seeking private classes, not for individual students seeking a class. If you’d like to be on the list, please send me an email, or use the “Contact” page under the “Site Info” menu here on PowerShell.

Don Jones

PowerShell Great Debate: Credentials

Credentials suck. You obviously don’t want to hardcode domain credentials into a script - and PowerShell actually makes it a bit difficult to do so, for good reason. On the other hand, you sometimes _need_ a script to do something using alternate credentials, and you don’t necessarily want the runner of the script to know those credentials. So how do you deal with it? Let’s be clear: This is not a wish list.

Don Jones
Announcements

TechSessions: Free PowerShell Webinars

PowerShell.org is going to be launching TechSessions this Fall. These will be ~1 hour online webinars, which you’re welcome to attend live. We’ll also record them and make the recordings available. In most cases you will need to register for each one, so that we can send the appropriate invite information. Our sponsors are working with us on these, so each one might be in a different webinar platform (Lync, Webex, etc) depending on who is providing the infrastructure that month.

Don Jones
PowerShell Summit

PowerShell Summit City Selection Criteria

As you may know, we’re in the process of putting together a PowerShell Summit Europe for Fall 2014. It’s a big task, with a lot of financial risks, so we try to get it right. Folks have been helpful on Twitter in offering city selection ideas… but there’s a bit more involved than just tossing out a city name. With that, here is the selection criteria! Given the information below… AND the fact that Germany/UK/Netherlands (in that order) have been getting the overwhelming majority of “in what cities would you attend the Summit” votes… what cities would YOU recommend we consider?

Don Jones

PowerShell Great Debate: Piping in a Script

Take a look at this: `# version 1 Get-Content computers.txt | ForEach-Object { $os = Get-WmiObject Win32_OperatingSystem -comp $_ $bios = Get-WmiObject Win32_BIOS -comp $_ $props = @{computername=$_; osversion=$os.version; biosserial=$bios.serialnumber} New-Object PSObject -Prop $props } version 2 $computers = Get-Content computers.txt foreach ($computer in $computers) { $os = Get-WmiObject Win32_OperatingSystem -comp $computer $bios = Get-WmiObject Win32_BIOS -comp $computer $props = @{computername=$computer; osversion=$os.version; biosserial=$bios.serialnumber} New-Object PSObject -Prop $props } `These two snippets do the same thing.

John Mello

PhillyPoSH 07/11/2013 meeting summary and presentation materials

Active Directory SDK team member and former Senior Programing writer for the Windows PowerShell team, Jun Blender gave a presentation on The Hidden Charms of Windows PowerShell 3.0 via Lync. You can get a copy of her presentation here and see a recording of the Lync meeting on our YouTube channel Microsoft Technology Evangelist Yung Chou gave demonstration on how to use the PowerShell Azure cmdlets to automate data center deployments You can try doing the same and test server 2012 R2 out with a free 1-month trial of Windows Azure General Announcements The Microsoft Virtual Academy is hosting 2 separate day long PowerShell learning sessions that will be taught by the lead Architect of PowerShell Jeffery Snover and PowerShell.

Boe Prox
PowerShell for Admins

Working with the WSUS API and the SUSDB Database using PowerShell

Tthe WSUS API can be used to perform a multitude of WSUS tasks from approving patches, removing clients to creating automatic approval rules to many other things. By diving deeper into the API reveals that we can also find out the name of the SQL server (if using a remote SQL database server) that the SUSDB database is residing on. Beyond that, we can actually perform queries to the database (using TSQL) or perform tasks against the database itself.

Don Jones
Announcements

PowerShell Summit… EUROPE?!?!?

I have received a lot of interest in a PowerShell Summit Europe, and we are starting to look at doing one in 2014. I know that’s a long way off, but it takes time to put these together when everyone’s volunteering that time! I have put together a very short survey to see if there is any consensus on where such an event might be held. The survey is online now and ready for your opinions.

Don Jones

PowerShell Great Debate: Backticks

Here’s an age-old debate that we can finally, perhaps, put an end to: The backtick character for line continuation. The basic concept looks like this: Get-WmiObject -Class Win32_BIOS -ComputerName whatever -Filter "something='else'"This trick relies on the fact that the backtick (grave accent) is PowerShell’s escape character. In this case, it’s escaping the carriage return, turning it from a logical end-of-line marker into a literal carriage return. It makes commands with a lot of parameters easier to read, since you can line up the parameters as I’ve done.

Don Jones
News

Would you contribute enterprise software reviews? [OFFTOPIC]

I’ve been working with a couple of folks lately who’ve been trying to review and pilot Active Directory auditing solutions. Both bemoaned the fact that, unlike consumer products of nearly any kind, IT products (specifically, enterprise software in this instance), don’t really get reviews from the admins who use those products. So, I’m curious. If you could (a) anonymously, and (b) without giving your organization’s name, would you (c) leave reviews of enterprise software for other admins?