Stand alone registry functions library

October 30, 2007

EDIT   A newer version of this library is available for PowerShell 2.0.   The following file (also included below) contains 20 stand alone registry functions to Read,Write,Delete,Test registry keys/values from local or remote computer. Here's a list of the functions: Get-RegBinary Get-RegDWord Get-RegDefault Get-RegExpandString Get-RegMultiString Get-RegQuadWord Get-RegString Get-RegValueKind New-RegSubKey Remove-RegSubKey Remove-RegSubKeyTree Set-RegBinary...
11 comments

Listing enumeration type values

October 25, 2007

  This post has an update here. A little utility function I wrote to automate the process of listing enumeration type names and values:   function Get-EnumValues{     ::getvalues($args) | select @{n="Name";e={$_}},@{n="Value";e={$_.value__}} | ft -auto }   PS > Get-EnumValues System.ConsoleColor        Name        Value        ----           -----             Black     0        DarkBlue     1     DarkGreen     2       DarkCyan     3        DarkRed     4 DarkMagenta     5    DarkYellow     6             Gray     7      DarkGray     8              Blue     9           Green    10             Cyan    11              Red    12       Magenta    13          Yellow    14          White    15 ...
no comments