So what I am doing is needing to translate some data from One AD domain to comare to Another AD domain. But all of the back story really isn't important. So in short what I am doing is running this following command against our current domain to create a CSV file of certain properties. At the moment I am only grabbing the DistinguishedName and ObjectGuid of all Group objects.
I then take the created CSV and remove the header rows from the file so it is just the raw data.
Get-ADGroup -Filter * -Properties * | Select-Object -Property DistinguishedName,ObjectGuid | Sort-Object -Property DistinguishedName | Export-Csv -NoTypeInformation c:\temp\adgroups.csv -Force -Encoding ASCII (Get-Content c:\temp\adgroups.csv) | Select -Skip 1 | Set-Content C:\temp\adgroups.csv
This result is working great but now I have another task to manipulate this data so it is readable by a third party application. What I need to do is to only the column containing the GUIDS. I need to remove the hyphens from GUIDs and then convert the GUID to HEX.
For example the a GUID of ...
77877b01-99ea-46e7-8ffc-04ec5acc7349 shoud be transformed into...
|
after removing the dashes and converting to hex. Thanks in advance. |