header image

Archive for October, 2014

DSC Resource Kit wave 8

Posted by: | October 31, 2014 Comments Off on DSC Resource Kit wave 8 |

Wave 8 has arrived and its massive with 48 new resources – that’s a 50%+ increase http://blogs.msdn.com/b/powershell/archive/2014/10/28/powershell-dsc-reskit-wave-8-now-with-100-resources.aspx   New modules include: xExchange xSCDPM xSCOM xSCSMA xSCSR xSCVMM xCredSSP xDismFeature xBitlocker xPendingReboot

under: PowerShell

PowerShell Summit NA 2015 – – Registration open

Posted by: | October 30, 2014 Comments Off on 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/

under: PowerShell, PowerShell.org, Summit

Cut and paste is not your friend

Posted by: | October 29, 2014 Comments Off on 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 one of the variable names in the new block and  spent a long time working […]

under: PowerShell

PowerShell in Depth second edition ebook

Posted by: | October 29, 2014 Comments Off on PowerShell in Depth second edition ebook |

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

under: Books, PowerShell

JEA ToolKIt helper

Posted by: | October 28, 2014 Comments Off on 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   http://blogs.technet.com/b/privatecloud/archive/2014/10/24/introducing-the-jea-toolkit-helper.aspx   A white paper on JEA is also available from the […]

under: PowerShell v5

PowerShell classes — using methods

Posted by: | October 27, 2014 Comments Off on 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 } ## constructors LastBoot(){} LastBoot([string]$computer, [DateTime]$lbt) {   $ComputerName = $computer   […]

under: PowerShell v5

PowerShell classes – – overloading constructors

Posted by: | October 25, 2014 Comments Off on 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 class you define the various ways in which it can be created – these are […]

under: PowerShell v5

PowerShell 5.0 – – classes

Posted by: | October 25, 2014 Comments Off on 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 = $computer   LastBootime = Get-CimInstance -ClassName Win32_OperatingSystem -ComputerName […]

under: PowerShell v5

PowerShell 5 – zip and unzip

Posted by: | October 25, 2014 Comments Off on PowerShell 5 – zip and unzip |

One the extras in PowerShell 5.0 is a couple of cmdlets for workign with zip archives. Actually, you’ll find they are PowerShell advanced functions if you look in the module which you’ll find at C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive   You get 2 cmdlets: £> Get-Command *archive | ft CommandTYpe, Name -a CommandType Name ———– —-    Function Compress-Archive […]

under: PowerShell v5

Run with PowerShell

Posted by: | October 22, 2014 Comments Off on Run with PowerShell |

Came across  something new today – Run with PowerShell.   if you have PowerShell 3.0 or later installed – right click on your script and select “Run with PowerShell”   A few rules though – The script can’t take parameters or output anything to the prompt. You can’t interact with the script or the console […]

under: PowerShell

Older Posts »

Categories