header image

Archive for March, 2017

PowerShell v6

Posted by: | March 31, 2017 Comments Off on PowerShell v6 |

Tried PowerShell v6 yet? Its the open sourced latest version of PowerShell – runs on Windows, Linux (various flavours) and MacOS Its available from – https://github.com/PowerShell/PowerShell Before you get too excited there’s a few things you need to remember: – its ALPHA code. That means its still under development and subject to change – its […]

under: PowerShell

Summit 2017–one week to go

Posted by: | March 31, 2017 Comments Off on Summit 2017–one week to go |

With one week to go before travelling to Seattle for the 2017 PowerShell & DevOps Summit I’m putting the finishing touches to my presentations and the Summit organisation. The agenda was published last October but we’ve had to make a few changes recently to cover for speakers that have dropped out. Check out the final […]

under: PowerShell, Summit

Name mismatch

Posted by: | March 29, 2017 Comments Off on Name mismatch |

Ever wondered why you can’t do this: Get-ADComputer -Filter * -SearchBase ‘OU=Servers,DC=Manticore,DC=org’ | Get-CimInstance -ClassName Win32_OperatingSystem The –ComputerName parameter on get-CimInstance accepts pipeline input BUT its by property name. PS> Get-Help Get-CimInstance -Parameter ComputerName -ComputerName [<String[]>] Specifies computer on which you want to run the CIM operation. You can specify a fully qualified domain name […]

under: PowerShell and Active Directory, PowerShell and CIM

Get-SupportedFileSystems

Posted by: | March 22, 2017 Comments Off on Get-SupportedFileSystems |

I stumbled on the Get-SupportedFileSystems cmdlet today. Its part of the Storage module and is defined as a function. Digging a bit further its from a CDXML module based on a CIM class. But which CDXML file contains the definition? PS> Get-ChildItem -Path ‘C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Storage’ -File | Select-String -Pattern ‘Get-SupportedFileSystems’ -SimpleMatch C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Storage\Storage.psd1:117:        ‘Get-SupportedFileSystems’, C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Storage\Volume.cdxml:405:      // Get-SupportedFileSystems […]

under: CIM, PowerShell, PowerShell and CIM

PowerShell Summit 2017–Community Lightning Demos

Posted by: | March 22, 2017 Comments Off on PowerShell Summit 2017–Community Lightning Demos |

Early Summits, and their precursors – the PowerShell Deep Dives – featured Lightning rounds where attendees had 10 minutes or so to present something PowerShell related – a tip, trick, discovery, cool piece of code, new technique etc etc etc …   Summit 2017 brings that concept back. If you’re attending Summit, and if not […]

under: PowerShell, Summit

Updating built in modules

Posted by: | March 20, 2017 Comments Off on Updating built in modules |

Windows 10 and Server 2016 automatically install a module called Pester which is used for testing code. Its the foundation of Test Driven Development or Behaviour Driven Development using PowerShell. The version  installed by default is 3.4.0. Pester is originally an open source module that has been incorporated into Windows. The latest version from the […]

under: PowerShell v5, Windows 10, Windows Server 2016

Hyper-V book deal

Posted by: | March 10, 2017 Comments Off on Hyper-V book deal |

March 11 2017 – My book Learn Hyper-V in a Month of Lunches is Manning’s Deal of the day. Get 50% off using code dotd031117au at http://bit.ly/2niU715 Also see https://www.manning.com/dotd

under: Books, Hyper-V, PowerShell

Windows 10 uptime

Posted by: | March 6, 2017 Comments Off on Windows 10 uptime |

One of the things that managers seem to be fascinated with is up time. For Windows server operating systems its a fairly simple calculation PS>  (Get-Date) – (Get-CimInstance -ClassName Win32_OperatingSystem | select -ExpandProperty LastBootUpTime) Days              : 0 Hours             : 3 Minutes           : 46 Seconds           : 45 Milliseconds      : 465 Ticks             : 136054659217 TotalDays         : 0.157470670390046 […]

under: PowerShell, Windows 10

Full Summit agenda available

Posted by: | March 4, 2017 Comments Off on Full Summit agenda available |

The full agenda – including the PowerShell team sessions – is now available on the event web site – – https://eventloom.com/event/home/summit2017 This is our biggest ever Summit. We’ve sold out for this year and are already making plans for next year’s Summit. Look for more information later in the year.

under: PowerShell, Summit

Modifying AD users in bulk

Posted by: | March 4, 2017 Comments Off on Modifying AD users in bulk |

Modifying AD users in bulk involves either setting one or more properties to the same value for a set of users or reading in the values you need from a data source of some kind. We prepared some test data in the last post so lets see how we use it. $users = Import-Csv -Path […]

under: PowerShell and Active Directory, PowerShell Basics

Older Posts »

Categories