代码之家  ›  专栏  ›  技术社区  ›  pirmax

在Windows 10上安装NativeScript的Windows PowerShell

  •  0
  • pirmax  · 技术社区  · 7 年前

    https://docs.nativescript.org/start/ns-setup-win

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

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

    10

    1 回复  |  直到 7 年前
        1
  •  1
  •   Bacon Bits    7 年前

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

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

    在这里 @powershell 意思是“不回显命令并运行powershell.exe”。它在PowerShell本身意味着完全不同的东西 @动力壳 意思是“搜索路径并用文字名执行程序 @动力壳 在扩展名“or”之前使用变量 $powershell

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

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

    一如往常 极其 在运行这些下载任意代码并立即执行的命令时要小心。

    推荐文章