Articles

PowerShell articles, tutorials, and guides from community experts.

Don Jones
PowerShell for Admins

DON'T Start Learning PowerShell?!?!?

Jason Helmick and I were recently up in Redmond recording a Microsoft Virtual Academy series entitled, “Building Your Datacenter One DSC Resource at a Time.” While we were there, we decided to film a tongue-in-cheek promo for the series that started with the premise that, “if you haven’t already learned PowerShell, you missed the bus.” Obviously, there’s a bit more to the story.

David Jones
PowerShell for Admins

Creating a small footprint, base image Part 4 | Bringing it all together with automation

In this entry I combing all I covered into a set of scripts to automate the process of creating a small footprint VHDX base image and a WIM to use a sorce that is fully patched. And I added a script to update the files on a regular basis.
Check it out and let me know what you think.
Creating a small footprint, base image Part 4 | Bringing it all together with automation

Matthew Hodgkins
Tips and Tricks

Automating with Jenkins and PowerShell on Windows

Take a minute think about how many PowerShell scripts you have written for yourself or your team. Countless functions and modules, helping to automate this or fix that or make your teams lives easier. You spend hours coding, writing in-line help, testing, packaging your script, distributing it to your team. All that effort, and then a lot of the time the script is forgotten about! People just go back to doing things the manual way.
I put this down to being out of sight, out of mind. Users who do not use the command line regularly will quickly forget about the amazing PowerShell-ing that you did to try and make their lives easier.
Then there are are other problems, like working out the best way to give end users permissions to use your function when they aren’t administrators. Do you give them remote desktop access to a server and only provide a PowerShell session? Setup PowerShell Web Access? Configure a restricted endpoint? I thought the point of this module was to make your life easier, not make things harder!
These problems are what an open source tool called Jenkins can solve for you. Traditionally used by developers to automate their build process, it can be leveraged to wrap web interfaces, job tracking and scheduling around the PowerShell scripts you worked so hard on.
The below image shows what a Jenkins build looks like. In this basic example, the the build creates a text file on a remote machine by using PowerShell Remoting and the Set-Content CmdLet**. **The parameters for these commands can be entered into the form, and will be passed to your PowerShell script via variables.
jenkins
To find out how to start leveraging Jenkins in your environment, take a look at the below blog posts:

Sunny Chakraborty

NYC Powershell Usergroup meets on June 8th

Continuing from our May meeting, Tome will be presenting a beginner’s track on Powershell covering String manipulations, Functions and Powershell Scripts.
We also have Powershell MVP Doug Finke, who will be covering the new components as part of the Powershell V5.0 release, including PSPM, Classes and Convert-String.
AGENDA:
Tome Tanasovski:
String manipulation

  • Counting, splitting, uppercasing/lowercasing, etc.
  • Format operator
  • -split, -join
  • -match, -replace
  • Select-String
  • Secure strings

Scripts and functions

  • Principles
  • Execution policies
  • Passing arguments and parameters
  • Scoping

Bio
Tome is an executive for a market-leading global financial services firm in New York City where he focuses on automation, private cloud, and distributed computing. He is the founder and leader of the New York City PowerShell User group, a blogger, and speaks regularly at conferences and user groups. In 2011 he became a cofounder of the NYC Techstravaganza, coauthored the Windows PowerShell Bible, and received the title of Honorary Scripting Guy from the Hey Scripting Guy! blog. Tome has also received the MVP award from Microsoft for the last five years in Windows PowerShell.
Blog: http://powertoe.wordpress.com
Twitter: http://twitter.com/toenuff
Doug Finke:

Don Jones
PowerShell for Admins

Major Changes to DSC Pull Server Configuration IDs

Configuration IDs - Globally Unique Identifiers, or GUIDs, that DSC nodes use to identify themselves to a pull server - have always been a limiting factor in DSC design and architecture. In the April 2015 preview of WMF5, however, Microsoft has completely overhauled Configuration IDs. If you’re working with DSC, this is must-have information.

Joel Newton
PowerShell for Admins

New PS Module for working with F5's LTM REST API

If you use F5’s BIG‑IP Local Traffic Manager (LTM) for load-balancing, then you may find the new PS module I’ve written helpful. The module uses the REST API in ver. 11.6 of the LTM to query and manipulate an F5 LTM device. You can add and remove members from a pool, enable and disable them, and find out what pools a member is in, among other things.
I’ve made the module files available here. I welcome all comments.
A few notes: Since the module uses the Invoke-WebRequest cmdlet, PowerShell 3 or higher is required. Also, since some F5’s utilize self-signed certificates, and Invoke-WebRequest is unhappy if part of the certificate chain isn’t trusted, I’ve included a dependency on Jaykul’s PS module TunableSSLValidator, which allows for temporarily ignoring certificate errors. If you’re using a trusted certificate chain, then you don’t need the TunableSSLValidator module and can remove the -insecure flags from the Invoke-WebRequest calls.
Cheers,
Joel

John Mello

Philadelphia PowerShell User Group Meeting – June 4th 2015

Join us on Thursday, June 4th when Dave Wyatt, will present The basics of encrypting and decrypting data, including symmetric and public key algorithms, key management / sharing, and digital certificates. This talk will focus on doing so in the .NET Framework and PowerShell.

About Dave

Dave Wyatt has been in the IT business since 1999 and is currently an Application Operations Engineer at DevOpsGuys. In addition Dave is a Microsoft MVP (PowerShell) and a member of PowerShell.org’s Board of Directors.
Please  register if you plan to attend in person or online. The meeting URL to join us remotely will be included in your Eventbrite registration confirmation.