Articles

PowerShell articles, tutorials, and guides from community experts.

Richard Siddaway

Account SIDs revisited

I realised there is an easier way to get the data `function get-SID { param ( [string] $computername = $env:COMPUTERNAME ) Get-WmiObject -Class Win32_AccountSID -ComputerName $computername | foreach { $exp = “[wmi]'” $( $_ . Element ) “'” Invoke-Expression -Command $exp | …

Richard Siddaway

Passing function names

A question asked about passing a function name into another function which then called the function. It sounds worse than it is. if you need to pass the name of a command and then call it try using invoke-expression `function ffour { Get-Random } function fthree { Get-Date } function ftwo { param ( …

Richard Siddaway

Account SIDs

A question on the forum asked about finding the accounts and SIDs on the local machine. `function get-SID { param ( [string] $computername = $env:COMPUTERNAME ) Get-WmiObject -Class Win32_AccountSID -ComputerName $computername | foreach { $da = ( ( $_ . Element ) . Split ( “.” ) [ 1 ] ) …

Richard Siddaway

Workflow article 4

The next in the series of articles on PowerShell workflows that are appearing on the Scripting Guy blog has been published. The articles in the series that have been published are: http://blogs.technet.com/b/heyscriptingguy/archive/2012/12/26/powershell-workflows-the-basics.aspx …

Richard Siddaway

Updating Help on PowerShell v3

One of the new features in PowerShell v3 is the capability to update the help files. In fact you have to do this because PowerShell v3 doesn"™t ship with any help files. Since Windows 8 RTM"™d there have been a succession of new help files released. I discovered one of my netbooks …