Archive for January, 2011

Clear AD attribute

Just yesterday a colleague of mine asked me how to undo an Active Directory object property change from the value he erroneously put back to <not set>. It turned out that I never actually blogged about that – so here you go. 🙂

Clearing AD attributes us actually as easy as just setting the value to $null. For example, here’s how you do it for properties which we have exposed in Set- cmdlets parameters:

Set-QADUser 'Amy Hardy' -City $null

Or for more internal attributes:

Set-QADUser 'Amy Hardy' -ObjectAttributes @{adminDescription=$null}

Hope that helps!

Advanced PowerShell Options in PowerGUI Script Editor

This add-on from James Brundage (from lets you easily fine-tune the PowerShell host right in the PowerGUI Script Editor.

1. Download the PowerShell Preferences add-on from here,

2. Unblock the zip file,

3. Extract it to the My Documents \WindowsPowerShell \Modules folder,

4. In Script Editor’s File / PowerShell Libraries dialog box, select PowerShellPreferences.

And you will get this panel in the script editor, allowing you to change all the internal settings of the PowerShell host:

  • Command history size,
  • Error history size,
  • Mail server for send-mailmessage,
  • Strict mode (automated checking for variable initialization, etc.),
  • What-if mode (automatically running all cmdlets with -whatif flag),
  • Error level,
  • Warning level,
  • Debug level,
  • Verbose message level,
  • Progress message handling.

Combined, these give you incredible control over the way that PowerShell works – which in turn can help a lot when debugging your PowerShell scripts.

Download the add-on here.

Happy scripting!


Dynamsoft online source control in PowerGUI Script Editor

Claus Thude Nielsen posted a step by step tutorial on how you can get PowerGUI’s version control system to use Dynamsoft.

Which is very cool because Dynamsoft:

  • Is a cloud system – so someone hosts that for you and can get to your files from anywhere,
  • It is free for up to 25 MB – and 25 MB is a lot of PowerShell scripts!

Learn more about Dynamsoft and get the step-by-step tutorial here.

Also, I have previously published similar tutorials on:

Meet the PowerShell Team: Jon White

In this video interview, Test Lead of the Microsoft PowerShell team – Jon White – talks about the history of PowerShell and the current state of the PowerShell adoption. Check it out and I am sure you will learn a thing or two:

This is the last of the quick video chats we had at TechEd Europe in Berlin in November 2010. Also, check out the interviews with:

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

January 2011

%d bloggers like this: