Monthly Archives: December 2015

Objects, properties and values

One thing that seems to keep causing confusion is using Select-Object to pick off one or more properties from a set of objects: PS> Get-CimInstance -ClassName Win32_Share | select Path Path—-C:\WINDOWSC:\ C:\windows\system32\spool\driversC:\Users The gap in the output is because the … Continue reading

Posted in Powershell Basics | Leave a comment

Infrastructure as Code article

My Infrastructiure as Code article – part of an introducing DevOps series – has gone live http://ed-baker.com/devops-practices-infrastructure-as-code/ You can also link to it through http://blogs.technet.com/b/uktechnet/ where you’ll find the first in my series of article on PowerShell. Second one will … Continue reading

Posted in DevOps, Powershell | Leave a comment

BinaryMiLog cmdlets

It’s not often I come across soemthing brand new in PowerShell but yesterday when I was investigating New-CimInstance I discovered 2 cmdlets in the CimCmdlets module I hadn’t noticed before. These are: Export-BinaryMiLog Import-BinaryMiLog The cmdlets are used to export, … Continue reading

Posted in CIM, PowerShell and CIM, PowerShell and WMI | Leave a comment

New-CimInstance cmdlet and the–Key parameter

I was asked a question about the –Key parameter on New-CimInstance today. I wasn’t sure of the answer so I’ve done some experimentation. I tend to avoid New-CimInstance if I can preferring to use the Create method on the CIM … Continue reading

Posted in CIM, PowerShell and CIM, PowerShell and WMI | Leave a comment

JEA Helper Tool 2.0

JEA – Just Enough Admin – is a security feature in WMF 5.0 and Windows Server 2016 (TP4) – providing RBAC for your Windows servers. You can allow people to perform the tasks needed by their role without giving them … Continue reading

Posted in PowerShell v5, Windows Server 2016 | Leave a comment

Scripting Guy gets Pestered

The Scripting Guy blog has been running a series on Pester written by Dave Wyatt – the modules author. Pester provides a way to perform, and automate, testing on your PowerShell code. The series is: http://blogs.technet.com/b/heyscriptingguy/archive/2015/12/14/what-is-pester-and-why-should-i-care.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2015/12/15/getting-started-with-pester.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2015/12/16/unit-testing-powershell-code-with-pester.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2015/12/17/testing-script-modules-with-pester.aspx http://blogs.technet.com/b/heyscriptingguy/archive/2015/12/18/more-pester-feature-and-resources.aspx

Posted in Powershell | Leave a comment

New ScriptAnalyzer

A new version of Script Analyzer is available for download – http://blogs.msdn.com/b/powershell/archive/2015/12/17/scriptanalyzer-v1-2-0-released.aspx A number of the rules have been updated and some new ones added

Posted in Powershell | Leave a comment