I have a batch script which is enabling a lot of auditing. the folder from where i am running this script is placed on my desktop where the username that is logged in is "Doctor A"
(the path from where the command is running from is c:\user\Doctor a\Desktop\script\test.bat).
And after running som batch commands I am trying to launch a PowerShell script with the following line:
powershell.exe -ExecutionPolicy Bypass "%~dp0\Audit_folders_and_regkeys.ps1"
When I run this command I get an error saying
The term 'C:\Users\Doctor' 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 line:1 char:16
+ C:\Users\Doctor <<<<  A\Desktop\CyperPilot_Audit_Conf_External_Network\CyperPilot_Audit_Conf_External_Network\\Audit_folders_and_regkeys.ps1
     + CategoryInfo          : ObjectNotFound: (C:\Users\Doctor:String) [], CommandNotFoundException
     + FullyQualifiedErrorId : CommandNotFoundException
It seems like it wont go further than C:\Users\Doctor what do I write in my batch file to fix this?


powershell.exe -ExecutionPolicy Bypass -File "%~dp0\Audit_folders_and_regkeys.ps1"