I have some code in PowerShell (below) to call the System.Guid
constructor with a byte array (byte[]
) as the only parameter.
The C# equivalent of this code is:
byte[] binaryData = userObj["ADGuid"].Value;
Guid adid = new System.Guid(binaryData);
This is my PowerShell code. It interprets the items array as individual parameters. How do I need to adjust this code?
[byte[]]$binaryData = $uo["ADGuid"].Value
$adid = new-object System.Guid -ArgumentList $binaryData
Here is a screenshot of the error message: