PowerShell for Windows Admins

Sep 30 2014   3:33AM GMT

PowerShell Summit Europe – Tuesday morning

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Tags:
Powershell

After a very successful DSC hackathon on Monday evening we reconvened on Tuesday morning with Steve Murawski delivering his second session on DSC.

A brief discussion on devops lead into looking at DSC configurations:

  • Configuration names can’t be hyphenated
  • Circular dependencies are detected
  • Partial named configurations allow multiple configurations working against same machine

The morning’s second session was me talking about creating cmdlets from the CIM StdRegProv class using a CDXML approach.  The talk started with using a single method and demonstrated how to add validation, simplify parameter input by the use of enumerations and how CDXML modules are used within PowerShell.

Dan Harman closed the morning session by talking about classes written in PowerShell – this functionality was introduced in the September preview of WMF 5

You can already define a class and load it with Add-Type but you have to write the class in C# or another .NET language. Now you can write the class in PowerShell

Classes can have overloaded constructors and methods.  All class members are public by default.

Enums are possible. Scoping is lexical not dynamic as in PowerShell

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: