PowerShell Team

Automating the world one-liner at a time…

Get-Me.ps1

On an internal mailing list someone asked how to get the SID for the current context using PowerShell.  Chris Bellée correctly responded: ([Security.Principal.WindowsIdentity]::GetCurrent()).user.accountdomainsid.value   I used this to create a script:  Get-Me.ps1 # Get-Me.ps1 [Security.Principal.WindowsIdentity]::...

Apologizes for the Confusion

If you visited our blog yesterday and were driven to go get a basket of "Freedom Fries" - you can relax.If you visited our blog yesterday and thought we were trying to get some class - I'm sorry to say that that is not the case.  The good news is that there is a new PowerShell blog in French at http://blogs.technet.com/powershell/...

Get-Everyone

Jeffery Snover just posted a Get-Me script.  The Get-Me script finds out the principal of the user running PowerShell.  In case you ever wanted to know how to get all of the users on a machine (or from a domain), here's a quick function that queries WMI for users. function Get-Everyone([switch]$fromDomain) { #.Synopsis...

PoshBoard and ConvertTo-HashTable

I’m currently watching an cool video of PoshBoard a PowerShell based Web Portal by Pilosite available on CodePlex.   It looks great.  In the middle of the video I noticed the following script he uses to populate one of the controls on the dashboard: $ht = @{ } $objDrives = gwmi –class “Win32_logicalDisk” –Namespace...

Verbs vs Nouns by Snapin

A while ago the System Center Virtual Machine Manager team showed me a chart of their cmdlets.  It was an Excel spreadsheet which had the VERBs as rows and the NOUNs as columns.  I thought that this was a wonderful way to look at the cmdlets.  I woke up this morning and decided to write a script which would do something similar...

Step up your FOREACH Game

Last night Bruce Payette and I were interviewed on the PowerScripting Podcast with Hal Rottenberg and Jonathan Walz.  It was a blast!  There were a ton of people connected and were firehosing questions & comments in the Chat window.  There were lots of comments/discussions about Twitter.  I confessed to having never ...

PowerShell Comic

I just found THIS.  ha ha! Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx...

ES24: Using PowerShell To Create Manageable Web Services

Attached are the slides I presented at the PDC.  Enjoy! Jeffrey Snover [MSFT]Windows Management Partner ArchitectVisit the Windows PowerShell Team blog at:    http://blogs.msdn.com/PowerShellVisit the Windows PowerShell ScriptCenter at:  http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx ES24_Snover_v02....