• How (NOT) to create 4 test VM’s with Windows server 2012 in PowerShell

    While testing with Hyper V in Windows 8 I Created 4 virtual machines with Windows 2012, for testing resource metering, partly in PowerShell (except for console input WS12 installation and where I cheated in the GUI ;) ) I decided to go as stupid as could be (yes I thought about removing some lines ;), but resisted, and with 82 lines in my history I (kind off) succeeded. ** Disclaimer ** Do not...
  • TestPost Windows 8 with Word 2013

    Here PowerShell V3 content will arrive Test Pasting Script code : get-command | measure-object | foreach { "Cmdlet count " + $PSItem . count }   Pasting Console output PS C:\Users\Marc> get-command | measure-object | foreach { "Cmdlet count " + $PSItem.count } Cmdlet count 1177 Spaces at beginning and Spacing of lines seems to be a problem (did look so good...
  • Meet up at MMS 2011 (and talk PowerShell)

    I you are at MMS 2011 and want to have a RL chat. Today we will hold a PowerShell Clinic at our Booth MMS 2011: PowerShell Script Clinic Q&A with Marc van Orsouw (aka “The PowerShell Guy”) Today 3-5PM And I will be at : 5:30 PM - Birds-Of-A-Feather Sessions (BOF) BOF: Advanced Automation using Windows PowerShell 2.0 Jasmine A Hope to meet you there : Enjoy, Greetings /\/\o\/\/ Read the full text...
  • PowerShell Script club Zürich

    As last year, I will be holding PowerShell script clubs in Switzerland, in cooperation with the Swiss IT User group ( http://swissitpro.com/ ) and  Digicomp (http://www.digicomp.ch/ ) Planning is to hold one about every 2 Months, with next week the kickoff with a PowerShell Script club in Zürich :       PowerShell Script Club (Zurich)     Language:    Deutsch / English     Tue / Dienstag - 1. Feb 2011...
  • PowerShell Get-Easter function

    Just to long to twitter : Function Get-Easter ($y){$a=(19*($y%19)+15)%30;$b=(2*($y%4)+4*($y%7)-$a+34)%7;$d=(($a+$b+114)%31)+1;$m=[math]::Floor(($a+$b+114)/31);([datetime]"$m/$d/$y").adddays(13)} can be used like this :   PS > Get-Easter 2011 Sonntag, 24. April 2011 00:00:00   Enjoy, Greetings /\/\o\/\/ Read the full text.
  • Discovering PowerTab V2 series Part 1 : Installation or upgrade from V1

    Last post there was a question on how to upgrade From the previous version of PowerTab Jason already answered in the comments. As I also had this planned as start of this series I explain a bit more, while I’m installing the new current version PowerTab 0.99.5 . To startup the PowerTab V1 installation added this block to the Profile ( Tip use ii $profile to open your profile) : ################ Start...
  • PowerTab for PowerShell version 2.0 beta released on CodePlex

    After a long silence, a grand new version of PowerTab is there ! With thanks to Jason Archer who took up the job and converted PowerTab to a PowerShell V2 Module. Next to that, he fixed the issues with PowerTab on V2.0 and made some fabulous additions to PowerTab too ! You can find PowerTab on Codeplex now : http://powertab.codeplex.com/ I’m using Jason’s version for the last weeks and...
  • MSDN content from PowerShell using WDSL

    When I saw this post : MSDN content is also available as a Web service Of course I had to try this in PowerShell The following code I came up with while testing will get the title of the following post http://msdn.microsoft.com/en-us/library/aa973757(VS.85).aspx : $msdn = New-WebServiceProxy http://services.msdn.microsoft.com/ContentServices/ContentService.asmx?wsdl $cr = New-Object...
  • Replace security on existing share with WMI in PowerShell (update post)

    This is an update of the script from my old Blog /\/\o\/\/ PowerShelled: Replace Security on existing share using MSH to PowerShell V2, I came at this post while recourcing a question about translating a SID, that I tested a lot with on my old blog see also the other posts about this here where you can find more examples. As I was at it I rewrote the existing script to work in PowerShell V2 Changes...
  • Back again !, Kudos to OrcsWeb and 4th PowerShell Scriptclub in Zurich

    Hi readers, First of all, sorry for this second longer outage of my blog and the low post rate lately, especialy for the downtime. Some explaination might be in order for that About the outage, after the first time when my Dutch registrar went broke, this time the reason was a SQL Database that went over limit some time ago, for some reason or another Community server did eat a lot of space...
  • Scripting Games 2010

    The Scripting Games are coming again, click on the 2010 Scripting games badge below for more info : Hope to see you there ! Enjoy, Greetings /\/\o\/\/ Read the full text.
  • DPM 2010 RC1 Extended Tweet

    <ExtendedTweet> Grr, getting bored of typing that servername every time with DPM Cmdlets For now some helper fuctions : function Get-ProtectionGroup {Microsoft.DataProtectionManager.PowerShell\Get-ProtectionGroup (hostname)} function Get-Datasource {Microsoft.DataProtectionManager.PowerShell\Get-Datasource (hostname)} … … But I think this Calls for some advanced functions, proxyCmdlet’s, (or a late...
  • Next PowerShell Script Club in Zurich March 2

    Next Month the 2nd of March  there is a PowerShell scriptclub in Zurich again. For more information or to register : http://www.digicomp.ch/sitpug   Enjoy, Greetings /\/\o\/\/ Read the full text.
  • PowerShell Script Club in Zurich

    Next week I will at the Swiss IT Pro User Group Event 3.Nov 2009 Zurich - PowerShell Script Club The first PowerShell Scriptclub in Zurich, with thanks to Desmond Lee , the Swiss IT Pro User Group and Digicomp Academy AG (Zürich) Below the excerpt from the newsletter ( the Dunglish is mine, sorry we had to be quick ) : Swiss IT Pro User Group Events - Di./Tu. 3 Nov. 2009 by IT Pros for...
  • Microsoft Evolution Day

    At 3 December I will be giving a PowerShell session at the Microsoft Evolution Day in Zurich, Microsoft Evolution Day Windows 7, Windows Server 2008 R2, Office Communication Server 2007 R2, Exchange 2010, Office 2010, SharePoint 2010, PowerShell 2.0 – die Evolution der Microsoft Lösungen geht rasend schnell. Am Microsoft Evolution Day vom 3. Dezember 2009 werden alle neuen Produkte live vorgestellt...
  • PowerShell Programming Praxis: Nerds, Jocks, and Lockers

    And another WTF Programing Praxis : Nerds, Jocks, and Lockers function get-OpenLockers ($num){1..([math]::sqrt($num))|%{$_*$_}} Enjoy, Greetings /\/\o\/\/ Read the full text.
  • PowerShell Programming Praxis: Josephus' Circle

    And another PowerShell excersise from the WTF (Worse than Failure) contest Programming Praxis: Josephus' Circle . (for more info see original contest post) Function get-SafeSpot ($count,$Skip) { $q = [Collections.queue](1..$count) while ($q.count -gt 1){ 1..($skip-1) |% {$q.enqueue($q.dequeue())} [void]$q.dequeue() } $q } By using a Queue (that works on a FIFO (First In First Out) base, I...
  • PowerShell : Display a GUID as string by default

    When you have a GUID object in PowerShell by default this gives no output, only some empty lines. See output below : PS C:\> [GUID]$a = "00000000-0000-0000-0000-000000000000" PS C:\> $a PS C:\> $a.ToString() 00000000-0000-0000-0000-000000000000 PS C:\> "$a" 00000000-0000-0000-0000-000000000000 PS C:\> Update-TypeData C:\MowTemp\GUID.ps1xml PS C:\> $a GUID ---- 00000000...
  • Russian Peasant Multiplication

    Small PowerShell exercise taken from the Programming Praxis: Russian Peasant Multiplication contest of WTF (Worse than Failure) implementing the Russian Peasant Multiplication method (for more info see original contest post) function Invoke-RussianMultiply ([int]$a,[int]$b) { "$a x $b" $r = 0 while($a -ne 1){ $a = $a/2 $b = $b*2 "$a x $b" if ($a%2) {$r+=$b;"`t+$b"} } "result : $r" } The result...
  • Get-Scripting Podcast Episode 11 - (MoW aka the PowerShell Guy)

    I had the pleasure to be interviewed for the Get-Scripting Podcast You can find the show here : Get-Scripting Podcast Episode 11 - (MoW aka the PowerShell Guy)   Enjoy, Greetings /\/\o\/\/ Read the full text.
  • Scripting Games : Formatdata file for Advanced event 6

    My solution for Advanced event 6 of the Summer Scripting Games is posted at the Script Center : Hey, Scripting Guy! Event 6 *Solutions* from Expert Commentators (Beginner and Advanced; the 110-meter hurdles) But the FormatData file ( mow.TracertData.ps1xml) seems to be missing in the Post (I had to re-send it because of AV removing PS1XML files so the post might be updated later), so I will post...
  • Details Leaked About the 2009 Summer Scripting Games!

    Details Leaked About the 2009 Summer Scripting Games! Enjoy, Greetings /\/\o\/\/ Read the full text.
  • Summer Scripting Games 2009

    The Summer Scripting Games 2009 are coming June 15–26, 2009 Of course I will be there again ! And as in the last years games I will post all my solutions on my blog: My solutions from the Winter Scripting Games 2007 and 2008 you can find on my blog here : Scripting games And the PowerShell versions I did for the 2006 winter games (there was not an official PowerShell category them but I did...
  • PowerTab 0.99b2 CTP3 fix

    Update to get PowerTab working in PowerShell CTP3 (Win7 and W2008R2) With thanks to Oisin Greetings /\/\o\/\/ Read the full text.
  • PowerShell V2 : Get-Weather function using a Web service

    In PowerShell V2 using a Web service is very easy with the new Cmdlet New-WebServiceProxy, As I will show in this post by creating a Small Get-Weather function.   On the site http://www.webservicex.com we can find a couple of Web services among them a Global Weather service that I will use in my PowerShell Get-Weather function. If we choose Global Weather on the website above we find some links among...