header image

Archive for July, 2014

History cmdlets

Posted by: | July 24, 2014 | No Comment |

There are 4 cmdlets for working with the history in a PowerShell session: Add-History – adds an entry to the history Clear-History – clears the history Get-History -enables you see the current history Invoke-History – enables you to run a line in your history Get-History is the one I use the most.  You can use […]

under: PowerShell

A uestion was asked on the forum about whether a parameter could be made mandatory sometimes and nor other – in particular if a parameter could be made mandatory if another parameter was used. My initial thought was that it couldn’t but a little experimentation with parameter sets produced this: function test { [CmdletBinding()] param […]

under: PowerShell

Welcome back

Posted by: | July 22, 2014 | No Comment |

This has taken over from the old blog at http://msmvps.com/blogs/richardsiddaway Not sure if I’ll be able to get the historical posts back.  You’ll find most of them at http://richardspowershellblog.wordpress.com/ I’d recommend making that your primary view of my blogs

under: Uncategorized

July 22 2014–deal of the day

Posted by: | July 22, 2014 | No Comment |

Half off my book PowerShell and WMI. Use code dotd072214au at www.manning.com/siddaway2/ Also Half off PowerShell in Depth, Second Edition. Use code dotd072214au at www.manning.com/jones6/

under: Books, PowerShell original

Another in my occassional series on bad practices I’ve seen and recommend you avoid.  This time I want to look at creating objects. I recently saw some code that looked a bit like this: $os = Get-CimInstance -ClassName Win32_OperatingSystem $comp = Get-CimInstance -ClassName Win32_ComputerSystem $bios =  Get-CimInstance -ClassName Win32_Bios $obj = New-Object -TypeName PSObject $obj […]

under: PowerShell original

DSC Resource Kit Wave 5

Posted by: | July 20, 2014 | No Comment |

The next wave of the DSC resource kit has arrived – see http://blogs.msdn.com/b/powershell/archive/2014/07/17/powershell-dsc-resource-kit-wave-5-arrives.aspx for details

under: PowerShell original

Docker and DSC for Linux

Posted by: | July 20, 2014 | No Comment |

Docker is a way to “virtualise” applications on Linux machines. With DSC for Linux you can manage Docker instances http://blogs.technet.com/b/privatecloud/archive/2014/07/17/configuring-docker-on-azure-with-powershell-dsc.aspx

under: PowerShell original

msmvps.com is down

Posted by: | July 20, 2014 | No Comment |

My mirror blog on msmvps.com is down – as is the rest of the site.  It is being worked on. In the meantime transfer here

under: General

Registration is now open. Access through Events menu at powershell.org

under: PowerShell original, PowerShell Summit

Last time I showed how to format disks using the Win32_Volume CIM class. If you need to perform this activity on a Windows Server 2012/Windows 8 or later system you can use a couple of cmdlets from the Storage module Get-Volume | where DriveLetter -ne ‘C’ | Format-Volume -FileSystem NTFS -Confirm:$false –WhatIf   If you’ve […]

under: Windows 2012 R2, Windows 8, Windows 8.1, Windows Server 2012

Older Posts »

Categories