Author Archives: richardsiddaway

PowerShell Summit NA 2015 – – Registration open

Registration for the PowerShell summit North America 2015 is open.  Details and registration link  – http://powershell.org/wp/community-events/summit/

Posted in Powershell, Summit | Leave a comment

Cut and paste is not your friend

I was working on some code the other day and as a block of code I needed was very similar to one I already had I did what everyone does & used cut and paste. Unfortunately, I missed out changing … Continue reading

Posted in Powershell | Leave a comment

PowerShell in Depth second edition ebook

The ebook for PowerShell in Depth second edition is available from Manning – http://www.manning.com/jones6/

Posted in Books, Powershell | Leave a comment

JEA ToolKIt helper

JEA – Just Enough Admin – brings Role Based Access Control to Windows. It enables you to delegate specific cmdlets to specific users on specific endpoints. A tool to help you create and mange JEA configurations is now available form … Continue reading

Posted in PowerShell v5 | Leave a comment

PowerShell classes — using methods

.NET objects usually have methods as well as properties. A method enables you to do something to or with the object.  PowerShell classes can implement methods: class LastBoot {[string]$ComputerName[DateTime]$LastBootime ## methods [TimeSpan] Uptime([datetime]$lbt){ $ts = (Get-Date) – $lbt return $ts} … Continue reading

Posted in PowerShell v5 | Leave a comment

PowerShell classes – – overloading constructors

You can usually create a .NET object from a class in one of several ways – no parameters i.e. and empty object up to an object with all of its properties populated as you create it. When you define a … Continue reading

Posted in PowerShell v5 | Leave a comment

PowerShell 5.0 – – classes

I’ve shown this method of creating a new object several times:   $source = @”public class LastBoot{  public string ComputerName {get; set;}  public string LastBootime {get; set;}}“@ Add-Type -TypeDefinition $source -Language CSharpVersion3 $computer = $env:COMPUTERNAME $props = [ordered]@{  ComputerName = … Continue reading

Posted in PowerShell v5 | Leave a comment