我目前正在测试cmdlet以恢复被错误删除的web应用程序。为此,我运行了以下脚本:
."C:\Scripts\Deploy\Prod\Include\include.ps1" #contains the function "get-settings"
$settings=get-Settings # login to Azure account and retrieve system settings as hashtable
Get-AzureRmDeletedWebApp -ResourceGroupName $settings.resourcegro
我正在创建一个powershell脚本来创建一个服务总线。我在网上找到了所有命令的文档,但是,当我运行这些命令时,它们不会被识别为有效的命令。例如,当我运行时,我会得到一个错误,当我执行Get-Command -Name 'servicebus‘时,我只得到以下选项
CommandType Name Version Source
flutter doctor --android-licenses在命令提示符下运行此命令后,它会显示'C:\Users\Username‘未被识别为内部或外部命令可操作程序或批处理文件,而不是flutter doctor --android-licenses未被识别为内部或外部命令、可操作程序或批处理文件。 ?
我写了一个简单的批处理文件,检查c驱动器路径是否存在,然后在该路径中执行exe,否则尝试d驱动器路径并执行它。
IF EXIST c:\program files\x goto a
ELSE goto b
:a
cd c:\program files\x
executable.exe c:\temp\col.zip
:b
cd d:\program files\x
executable.exe c:\temp\col.zip
我得到了这个错误:
-错误输出-- 'ELSE‘未被识别为内部或外部命令、可操作程序或批处理文件。系统找不到指定的路径。'execu