At his Birds of a feather session at TechEd 2013, Glenn Sizemore and I briefly debated something that I’d like to make the topic of today’s Great Debate. It has to do with how you create new, custom objects. For example, one approach – which I used to favor, but now think is too long-form: $obj = New-Object -Type PSObject $obj | Add-Member NoteProperty Foo $bar $obj | Add-Member NoteProperty This $that We saw some variants in The Scripting Games, including this one: $obj = New-Object PSObject Add-Member -InputObject $obj -Name Foo -MemberType NoteProperty -Value $bar I generally don’t like […]
I loved this weekâ€™s challenge as it had the right wiggle room to bring out the best in our participants.Â Of course, this is also the point in the games when we start to get everyoneâ€™s â€œAâ€ game.Â At this point even our new competitors are all warmed up and in the zone, and let me tell you the entries this week show it! Â Â I want to start with the beginners as I actually ran almost every entry this week.Â Honestly everyone fell into one of three buckets Select-string, Import-CSV or ,Foreach.Â Let me explain there where three primary means […]
Again if youâ€™re participating in the games this year youâ€™ve already won!Â If youâ€™re not and youâ€™re reading this post what are you doing!Â Iâ€™ve watched authors step there game up over the past month, and I can tell you from personal experience the games will make you better at your real job.Â Itâ€™s like sharpening an axe, an axe made of super juice that can automate the world Well that’sÂ clever! I came across this script this morning. $prop = Write-Output Name,Title,Department,LastLogonDate,PasswordLastSet,LockedOut,Enabled Get-ADUser -Filter * -Properties $prop | Get-Random -Count 20 | Select-Object $prop | ConvertTo-Html -Title "Active Directory Audit" […]
This time of the year always feels like someone is holding down the fast forward button.Â I blinked and here we are Friday morning another week of scripts in the rear view.Â I spent most of my week in the beginner class this week, and was greeted by a combination of beginners and scripters who werenâ€™t quite ready to step up to advanced.Â More of the latter if Iâ€™m to be honest.Â This was a pleasant surprise as itâ€™s another sign of the continuing growth of our community.Â Now on to the scripts I knew when I signed up to […]
Well guys, and gals another year has passed, and the annual scripting games are upon us again.Â After a week of reviewing submissions for their technique and style I must say that I am truly impressed!Â As a community the average ability seems to be growing by leaps and bounds.Â Thatâ€™s not to say weâ€™re all Samurai just yet, but weâ€™re getting there! Before I go off and nit-pick I want to congratulate you all on a small mountain of really well written scripts.Â Some of the things that the community was preaching 5 years ago are now just standard.Â […]
On this weekâ€™s show (6/15/11 @ 9:30pm EST right here on Justin.tv!), weâ€™ll be talking to Glenn Sizemore from NetApp about his latest PowerShell stuff announced and demo’d recently at TechEd. Be sure to drop by the chatroom Wednesday so that you can post questions to Glenn and interact with your fellow PowerShellers! No related posts.