-
Notifications
You must be signed in to change notification settings - Fork 335
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working