Archive for August, 2011

Video: Bruce Payette – Inside PowerShell Runtime

Here’s recording, slides and scripts from one of my favorite talks of TEC US 2011 PowerShell Deep Dive – Bruce Payette’s “Why Does it Work that Way? Inside the PowerShell Runtime”

This session was recorded live at The Experts Conference.

Session abstract:

PowerShell is a unique environment, combining features from shell, scripting and object-oriented programming languages. In this session recorded at The Experts Conference 2011 PowerShell Deep Dive, Bruce Payette explores some of the trade-offs and design decisions that were made in order to produce a workable system.

Part 1:

Part 2:

This is a live recording from US TEC 2011 PowerShell Deep Dive conference. TEC Europe is just around the corner – October 17-19th, 2011 in FrankfurtRegister today to get a discount.

See also:

Show your support: Vote for AD cmdlets, PowerShell, and PowerGUI

If Get-QADUser (or any other QAD cmdlet) or PowerGUI ever saved your day – now is a good time to show your love and spread the news. 🙂

Windows IT Pro magazine put us in their community award finals. So if you want to show your support:

1. Simply go to the award voting page,

2. For the first nomination, Best Active Directory & Group Policy Product, pick Quest Software ActiveRoles Management Shell for Active Directory (who would have thought that the official name was so long):

3. And obviously leave them a note in the Give us a killer quote about your winner! box.

4. Also, believe it or not 17. Best Microsoft Product has PowerShell as one of the options.

5. 21. Best Scripting Tool has Quest Software PowerGUI:

6. And obviously feel free to either ignore all other categories or cast your vote there as well.

Cast your vote now – before the contest is over.

Clean up expired certificates from AD

Security MVP Vadims Podans just did a great post on using PowerShell to remove expired user certificates from Active Directory.

In a nutshell,

  • If your company is using certificates for user authentication or encryption, these expire every now and then,
  • Your Enterprise CA in that case appends new certificates to users’ userCertificate attribute, while leaving expired certs there as well,
  • Over time these increasingly clutter your AD, making administration more difficult and negatively affecting AD replication traffic.

Luckily, cleaning up expired certificates with PowerShell is extremely easy.

To do the clean-up for a specific user you can run this one-liner:

Get-QADUser username | Remove-QADCertificate -Valid:$false

To clean-up the entire domain, just do:

Get-QADUser | Remove-QADCertificate -Valid:$false

See Vadim’s original post for details.

Read more about PKI management with PowerShell here.

Compile PowerShell scripts to exe

Script compilation to executable files is one of the features we have added in PowerGUI Pro 3.0.

You would likely want to use compile a script when you want to share it in the enterprise environment and you are not sure whether the other person is comfortable running scripts or you simply don’t want risking someone modifying the code.

To compile a PowerShell script:

  1. Open the script in PowerGUI Pro Script Editor,
  2. On the Tools menu, click Compile Script,
  3. Then specify the name and path for the exe file you want to create:

PowerShell Compiled scripts

The additional options you get are:

  • Show or hide the PowerShell Console window when executing the script,
  • Automatically close or keep the console window (if you do want to show it),
  • Protect the script source code by obfuscating it using a password you specify,
  • Add other PowerShell scripts  to the exe (if you have script which your main script is using).

[UPDATE] If your script access parameters – so will the exe file it generates. So for an executable generated from a script like:

param ($MyParam1, $MyParam2) "MyParam1: $MyParam1""MyParam2: $MyParam2"

You may use a command line like:
c:\Generated.exe -Arguments -MyParam2 "Value2" -MyParam1 "Value1"


To try this feature, you can install a trial version of PowerGUI Pro from here.

(Screenshot taken from the original PowerGUI 3.0 announcement which lists a lot of other great features we shipped in that release)

Slides from Deep Dive sessions

Here are the slidedecks from the three sessions which recordings I previously posted:

Slides: TEC US 2011: PowerShell Deep Dive: Aleksandar Nikolić – Constrained PowerShell Endpoints – plus the video here – plus PowerShell code from the demos

Slides: TEC US 2011: PowerShell Deep Dive: Sean Kearney – Integrating PowerShell with Legacy Environments – plus the video here – plus PowerShell code from the demos

Slides: TEC US 2011: PowerShell Deep Dive: Dan Harman – Module Patterns & Practices – plus the video here

As a bonus, here are answers to some of the questions on videos which I got lately:

  • Yes, more videos are coming – it is just taking time to get them all produced and posted,
  • I will do my best to locate and post the PowerShell code which the presenters were using,
  • I know that it is hard to see the screen on these recordings – we will do our best to use a better recording technology next time,
  • And regardless of all of the above, slides and recordings are no substitute for being at the Deep Dive – register for the next one in Frankfurt – October 17-18, 2011 – it is a life-changing experience!

Deep Dive video: Integrating Powershell with Legacy Environments – Sean Kearney

One of the most energetic session recording from the PowerShell Deep Dive – the one by the one and only Energized Tech – PowerShell MVP Sean Kearney.

Sean shows how PowerShell can be friends with pretty much anything you already have in your environment: console applications, CMD/batch files, VBScript, you name it!

This is a live recording from US TEC 2011 PowerShell Deep Dive conference. TEC Europe is just around the corner – October 17-19th, 2011 in Frankfurt.Register today to get a discount.

See also:

Deep Dive video: Constrained PowerShell Endpoints – Aleksandar Nikolic

We continue publishing the recordings from the previous PowerShell Deep Dive. This is Aleksandar‘s session on constrained runspaces / constrained endpoints – and was probably one of the most advanced sessions of the conference.

Aleksandar looks at the PowerShell remoting from the service creator’s point of view. The goal of constrained endpoints is to provide controlled access to services on a server in a secure manner. He shows how to create and configure a custom endpoint, control who has access to it, and constrain a session to defined set of capabilities available to users connecting to the endpoint.

This is a live recording from US TEC 2011 PowerShell Deep Dive conference. TEC Europe is just around the corner – October 17-19th, 2011 in Frankfurt. Register today to get a discount.

See also:

My Recent Tweets


The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

August 2011
« Jul   Sep »

%d bloggers like this: