PrateekKumarSingh / AzViz

⚡ ☁ Azure Visualizer aka 'AzViz' : A #powershell module to automatically generate Azure resource topology diagrams by just typing a PowerShell cmdlet and passing the name of one or more Azure Resource groups
MIT License
603 stars 151 forks source link

Space in username results in systematic error when using Export-AzViz #44

Open Bv-Lucas opened 3 years ago

Bv-Lucas commented 3 years ago

Hello Prateek

Very nice work !! Congrats 👍

I have an issue when using the module. My username contains a space on windows, when I run the command I get this error :

Export-PSGraph : The term 'C:\Users\Lucas' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\Lucas Bouvy\Desktop\GIT\AzViz\AzViz\src\public\Export-AzViz.ps1:274 char:6

I tried to "cheat" by setting manual paths in Export-AzViz.ps1 parameters, but didn't manage to make it work

I assume it is because of the space in my username. I will try on another account with no space and let you know

StefTan commented 2 years ago

Using version 1.2.1 having this issue as well:

▶ Configuring Defaults... 327ms ▶ Target Type : Azure Resource Group ▶ Output Format : png ▶ Exluded Resource Types : ▶ Output File Path : C:\Users\Stef Tan\AppData\Local\Temp\output.png ▶ Label Verbosity : 1 ▶ Category Depth : 1 ▶ Sub-graph Direction : top-to-bottom ▶ Theme : light ▶ Launch Visualization : True

..............

Export-PSGraph : The term 'C:\Users\Stef' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Users\Stef Tan\OneDrive - Dephion\Documents\WindowsPowerShell\Modules\AzViz\1.2.1\src\public\Export-AzViz.ps1:274 char:6

A export with a fixed output file works fine:

▶ Configuring Defaults... 340ms ▶ Target Type : Azure Resource Group ▶ Output Format : png ▶ Exluded Resource Types : ▶ Output File Path : c:\stef.png ▶ Label Verbosity : 1 ▶ Category Depth : 1 ▶ Sub-graph Direction : top-to-bottom ▶ Theme : light ▶ Launch Visualization : True