Monthly Archives: April 2012

Scripting Games 2012 comments: #8 Beginners Event 4

http://blogs.technet.com/b/heyscriptingguy/archive/2012/04/05/2012-scripting-games-beginner-event-4-compare-two-folders.aspx Makes sure you run the script provided with the event to get the right folders. The script randomly removes 1 file from each folder – sneaky. After last nights head scratching this one is much simpler. It’s solvable with … Continue reading

Posted in Powershell Basics, Scripting | Leave a comment

Scripting Games 2012 comments: #7 update on beginners event 3

It was bugging me that I couldn’t get try-catch work on the folder where I didn’t have permissions. Finally thought of the reason – set the ErrorAction to Ignore. Heres the revised script [CmdletBinding()] param ( [string]$path = “C:\2012sg\event3”, [string]$file … Continue reading

Posted in Powershell Basics, Scripting | Leave a comment

Scripting games 2012 comments: #6 Beginners event 3

Onto event 3 http://blogs.technet.com/b/heyscriptingguy/archive/2012/04/04/2012-scripting-games-beginner-event-3-create-a-file-in-a-folder.aspx where we have to create a file in a folder. Simple – well yes but not with the twists the Scripting Guy throws at you. The requirements: save file in c:\2012sg\event3 file contains process name and … Continue reading

Posted in Powershell Basics, Scripting | 1 Comment

UK PowerShell Group–24 April 2012

This months meeting is the first of two looking at the new PowerShell functionality in Windows Server 8. Yes, there is so much it will take two sessions! When: Tuesday, Apr 24, 2012 7:30 PM (BST)Where: Virtual *~*~*~*~*~*~*~*~*~* This is … Continue reading

Posted in PowerShell User Group, PowerShell V3, Windows 8 Server | Leave a comment

Scripting Games 2012 comments: #5 using WHERE

  I have seen a few interesting variations on using where-object during the games. This is normally aliased to where. You can use ? if you are fanatical about aliases but to me your PowerShell starts to become unreadable if … Continue reading

Posted in Powershell Basics, Scripting | 4 Comments

Scripting Games 2012 comments: #4 Beginners Event 2

Second event is to find running services that can be stopped http://blogs.technet.com/b/heyscriptingguy/archive/2012/04/03/2012-scripting-games-beginner-event-2-find-stoppable-running-services.aspx Lets start with the requirements we can pick out of the event information: Find all services that are running that will accept a Stop Command Need to run … Continue reading

Posted in Powershell Basics | Leave a comment

Scripting Games 2012 Comments: #3 Beginners Event 1

I thought I’d publish a series on how I would go about solving these plus some comments and observations on the submitted scripts. First event of the games http://blogs.technet.com/b/heyscriptingguy/archive/2012/04/02/the-2012-scripting-games-beginner-event-1-use-windows-powershell-to-identify-a-working-set-of-processes.aspx Firstly pick out the salient points of the event Need to: … Continue reading

Posted in Powershell Basics | Leave a comment