<# .SYNOPSIS Creates and displays a GUID as a byte String .DESCRIPTION This script first creates a guid, then displays it as a byte string .NOTES File Name : Get-GuidByteString.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell V2 .LINK http://pshscripts.blogspot.co.uk/2008/07/get-guidbybytestring.html .EXAMPLE PSH [C:\foo]: .\Get-GuidByteString.ps1' The GUID: 85d9e3b9-b414-481a-a773-57ca98ae893c converted to byte array is: 185 227 217 133 20 180 26 72 167 115 87 202 152 174 137 60 #> # Create a new GUID $g = [system.guid]::newguid() # Get guid into byte array $b=$g.tobytearray() # Finally display the byte array 'The GUID: {0} converted to byte array is:' -f $g $b
This blog contains PowerShell scripts, more PowerShell scripts and still more PowerShell scripts. Occasionally you may see some organisational posts.
Showing posts with label newguid. Show all posts
Showing posts with label newguid. Show all posts
Saturday, 26 July 2008
Get-GuidByteString.ps1
Labels:
newguid,
powershell,
scripts,
system.guid,
tobytearray
Friday, 25 July 2008
New-Guid.ps1
<# .SYNOPSIS Gets a new guid .DESCRIPTION This script used sytem.guid to create a new guiod .NOTES File Name : New-Guid Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell .LINK http://www.pshscripts.blogspot.com .EXAMPLE PSH [C:\foo]: .\New-Guid.ps1 Guid
----
8aadd649-9e6b-4f8c-882d-351636ab5ed4
#> ## # Start of Script ## # Create a new GUID $g = [system.guid]::newguid() # Display the new guid $g # End of script
Labels:
newguid,
powershell,
scripts,
system.guid
Saturday, 12 July 2008
Get-GuidByByteString
<# .SYNOPSIS Creates and displays a GUID as a byte String .DESCRIPTION This script first creates a guid, then displays it as a byte string .NOTES File Name : Get-GuidByteString.ps1 Author : Thomas Lee - tfl@psp.co.uk Requires : PowerShell V2 CTP3 .LINK http://pshscripts.blogspot.co.uk/2008/07/get-guidbybytestring.html .EXAMPLE PSH [C:\foo]: .\Get-GuidByteString.ps1' The GUID: 85d9e3b9-b414-481a-a773-57ca98ae893c converted to byte array is: 185 227 217 133 20 180 26 72 167 115 87 202 152 174 137 60 #> # Create a new GUID $g = [system.guid]::newguid() # Get guid into byte array $b=$g.tobytearray() # Finally display the byte array 'The GUID: {0} converted to byte array is:' -f $g $b
Labels:
newguid,
powershell,
scripts,
system.guid,
tobytearray
Subscribe to:
Posts (Atom)