header image

Archive for 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 the first of two meetings looking at the new PowerShell functionality available in Windows Server […]

under: PowerShell User Group, PowerShell V3, Windows 8 Server

  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 its heavily aliased. Consider get-process.  It returns a set of process objects. Where-Object is used […]

under: PowerShell Basics, Scripting Games

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 remotely against trusted remote computers Assume appropriate ports are open of firewalls Don’t need a […]

under: PowerShell Basics, Scripting Games

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: Identify Top 10 processes consuming memory resources on each computer Decided that working set is […]

under: PowerShell User Group, Scripting Games

The beginners section of the scripting games can be often answered with one pipeline of PowerShell. Notice that I stated one pipeline not one line Since the early days of PowerShell there has been an almost mystical reverence  paid to the concept of the “one-liner” ie boiling the PowerShell script down to a single line. […]

under: PowerShell Basics

I’m seeing a lot of scripts where code is used to perform an action that is available as a parameter on a cmdlet that is used earlier in the pipeline.   Read the help file for the cmdlets you are going to use to see how you can get PowerShell to do the work for […]

under: PowerShell Basics, Scripting, Uncategorized

As with previous games I’ll publish a series of comments on the games. I won’t deal with any event specific issues until the games events are all closed but there are some things coming through that while not affecting any gradings don’t make the best use of PowerShell. The first one that’s jumped out is […]

under: PowerShell Basics, Scripting Games

We’re just about at the halfway point with 5 events available – remember there is only a week to complete an event. Deadlines start on Monday. The overall quality of submissions from what I’ve seen so far is up on last year which is an achievement. What is staggering is that we’ve already had as […]

under: PowerShell original, Scripting Games

Jump over to http://blogs.technet.com/b/heyscriptingguy/ for event 1 in the beginners and advanced categories

under: PowerShell original, Scripting Games

A forum question asked how to find the primary name from an alias or CNAME record. Get-WmiObject -Namespace ‘root\MicrosoftDNS’ -Class MicrosoftDNS_CNAMEType ` -Filter "ContainerName = ‘Manticore.org’" -ComputerName server02 | select @{N=’Alias’; E={$_.Ownername}}, Primaryname   use the MicrosoftDNS_CNAMEType class. Filter on the domain ie containername.  ComputerName holds the DNS server name. Change OwnerName to Alias in […]

under: DNS, PowerShell and WMI

« Newer Posts - Older Posts »

Categories