After running Get-AzDomainInfo -verbose I received an Illegal characters in path error for every time Get-AzDomainInfo tried to write any output:

This is because the subscription has pipes | in it's name and those are illegal characters for a folder name. To fix my issue I edited lines 173-176 of Get-AzDomainInfo.ps1 to the following code:
$folderSubscription = $Subscription.replace('|','-')
if(Test-Path $folder"\"$folderSubscription){}
else{New-Item -ItemType Directory $folder"\"$folderSubscription | Out-Null}
$folder = -join ($folder, "\", $folderSubscription)
Probably a better solution to catch all Illegal characters is remove any characters from [System.IO.Path]::GetInvalidFileNameChars() -join '' out of the folder name to prevent this issue in the future.
After running

Get-AzDomainInfo -verboseI received an Illegal characters in path error for every time Get-AzDomainInfo tried to write any output:This is because the subscription has pipes
|in it's name and those are illegal characters for a folder name. To fix my issue I edited lines 173-176 of Get-AzDomainInfo.ps1 to the following code:Probably a better solution to catch all Illegal characters is remove any characters from
[System.IO.Path]::GetInvalidFileNameChars() -join ''out of the folder name to prevent this issue in the future.