header image

Archive for December, 2015

Objects, properties and values

Posted by: | December 23, 2015 Comments Off on 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:\WINDOWS C:\   C:\windows\system32\spool\drivers C:\Users   The gap in the output is because the IPC$ share doesn’t have a path defined.   What […]

under: PowerShell Basics

Infrastructure as Code article

Posted by: | December 23, 2015 Comments Off on 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 be coming in the New Year

under: DevOps, PowerShell

BinaryMiLog cmdlets

Posted by: | December 22, 2015 Comments Off on 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, or import, CIM instances as a binary encoded file.  Think of them as  Export-Clixml […]

under: CIM, PowerShell and CIM, PowerShell and WMI

New-CimInstance cmdlet and the–Key parameter

Posted by: | December 21, 2015 Comments Off on 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 class – however not all CIM classes have a create method so need to […]

under: CIM, PowerShell and CIM, PowerShell and WMI

JEA Helper Tool 2.0

Posted by: | December 21, 2015 Comments Off on 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 full access.  An introductory document is available – https://gallery.technet.microsoft.com/Just-Enough-Administration-6b5ad370 Doing all this manually can be […]

under: PowerShell v5, Windows Server 2016

Scripting Guy gets Pestered

Posted by: | December 20, 2015 Comments Off on 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

under: PowerShell

New ScriptAnalyzer

Posted by: | December 20, 2015 Comments Off on 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

under: PowerShell

WMF 5.0 RTM for Windows 8.1 and Windows 7

Posted by: | December 19, 2015 Comments Off on 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   For the x64 versions you need to use the appropriate server version. For […]

under: PowerShell v5

Inputting computer names

Posted by: | December 18, 2015 Comments Off on 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 are a range of techniques.   One of the simplest approaches is to create your […]

under: PowerShell Basics

WMF 5.0 now RTM

Posted by: | December 18, 2015 Comments Off on 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

under: PowerShell v5

Older Posts »

Categories