PowerShell : Display a GUID as string by default

Syndicated Summary

When you have a GUID object in PowerShell by default this gives no output, only some empty lines. See output below : PS C:\> [GUID]$a = "00000000-0000-0000-0000-000000000000" PS C:\> $a PS C:\> $a.ToString() 00000000-0000-0000-0000-000000000000 PS C:\> "$a" 00000000-0000-0000-0000-000000000000 PS C:\> Update-TypeData C:\MowTemp\GUID.ps1xml PS C:\> $a GUID ---- Read More...

Read the complete post at http://thepowershellguy.com/blogs/posh/archive/2009/07/24/powershell-display-a-guid-as-string-by-default.aspx


Posted Jul 24 2009, 10:47 AM by The PowerShell Guy
Filed under: ,
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.