Çok sayıda denetim olanağı sağlayan bir toplu iş komut dosyası var. Bu komut dosyasını çalıştırdığım klasör masaüstümde, oturum açmış olan kullanıcı adının "Doktor A" (komutun çalıştığı yerden c:\user\Doctor a\Desktop\script\test.bat
) olduğu yere yerleştirilir. Ben bu komutu çalıştırdığınızdageçersiz yol
powershell.exe -ExecutionPolicy Bypass "%~dp0\Audit_folders_and_regkeys.ps1"
Ben Öyle görünüyor
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
söyleyerek bir hata alıyorum:
Ve aşağıdaki satırla bir PowerShell komutu başlatmak için çalışıyorum çalışan som toplu komutları sonra
C:\Users\Doctor
'dan daha ileri gitmeyecek, bunu düzeltmek için toplu dosyamda ne yazarım?
Klasörü c: \ script \ .... içine koyarsam mükemmel çalışır –
'powershell.exe -ExecutionPolicy Bypass -Dosya"% ~ dp0 \ Audit_folders_and_regkeys.ps1 "' – PetSerAl