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

WMF 5.0 RTM for Windows 8.1 and Windows 7

The PowerShell Team blog http://blogs.msdn.com/b/powershell/archive/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available.aspx has been updated to show WMF is now available for Windows 8.1 Windows 7 SP1 On the download center – https://www.microsoft.com/en-us/download/details.aspx?id=50395 – You’ll see x86 versions of WMF 5.0 for Windows 8.1 and Windows 7 … Continue reading

Posted in PowerShell v5 | Leave a comment

Inputting computer names

Somehting I was writing yesterday started me thinking about the way you input a list of computer names to a cmdlet. Many cmdlets have a ComputerName parameter so knowing how to deal with this sort of input will help. There … Continue reading

Posted in Powershell Basics | Leave a comment

WMF 5.0 now RTM

WMF 5.0 , including PowerShell 5.0, was released to RTM overnight – why does this lways happen when I’m asleep http://blogs.msdn.com/b/powershell/archive/2015/12/16/windows-management-framework-wmf-5-0-rtm-is-now-available.aspx Versions are available for: Windows Server 2012 R2 Windows Server 2012 Windows Server 2008 R2 SP1

Posted in PowerShell v5 | Leave a comment