# ============================================================================================== # # Microsoft PowerShell Source File -- Created with SAPIEN Technologies PrimalScript 4.1 # # NAME: Show-RegisteredUser.ps1 # # AUTHOR: Jeffery Hicks , JDH Information Technology Solutions # DATE : 8/23/2006 # # COMMENT: Demonstration script for reading the registry in PowerShell # KEYWORDS: PowerShell, Registry, Get-ItemProperty # ============================================================================================== #Show-RegisteredUser.ps1 $path="HKLM:\Software\Microsoft\Windows NT\CurrentVersion" $reg=Get-ItemProperty $path #$reg #Uncomment this line if you want to see all of the available properties write-Host "Registered Owner:"$reg.RegisteredOwner write-Host "Registered Organization:"$reg.RegisteredOrganization Write-Host `n #write a blank line just to make it easier to read