Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows PowerShell在Windows 10上安装NativeScript_Powershell_Nativescript - Fatal编程技术网

Windows PowerShell在Windows 10上安装NativeScript

Windows PowerShell在Windows 10上安装NativeScript,powershell,nativescript,Powershell,Nativescript,我尝试从Admin PowerShell控制台在Windows 10上安装NativeScript 我键入此命令并获得以下错误: @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://nativescript.org/setup/win-avd'))" 当需要从CMD命令提示符运行命令时,您正在从PowerShell运行该命

我尝试从Admin PowerShell控制台在Windows 10上安装NativeScript

我键入此命令并获得以下错误:

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://nativescript.org/setup/win-avd'))"

当需要从CMD命令提示符运行命令时,您正在从PowerShell运行该命令

从CMD运行此命令:

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://nativescript.org/setup/win-avd'))"
此处,@powershell表示不回显命令并运行powershell.exe。它在PowerShell本身中的含义完全不同,@PowerShell意味着搜索路径并在扩展名之前执行文字名为@PowerShell的程序,或者根据您的PowerShell版本将变量$PowerShell用作splat变量

如果您在Powershell中运行它,则只需运行:

iex ((new-object net.webclient).DownloadString('https://nativescript.org/setup/win-avd'))

与往常一样,在运行这些下载任意代码并立即执行的命令时要格外小心。

您能将错误翻译成英语吗?这会更容易帮助你。我看了你粘贴的文档。只需在CMD而不是powershell中运行它。如果要在powershell中运行此程序,则只需新建对象net.webclient.DownloadString'https://nativescript.org/setup/win-avd“谢谢@ArcSet!我不知道,我读到: