cmd call powershell command

纯净搜索 为您找到 本页 4 条,用时 5.57 秒(数据源:360)

AI 回答 由 glm-4-flash 生成 · 仅供参考,请自行核实
1. 使用 `cmd` 调用 `powershell` 命令:
```cmd
powershell <command>
```
例如:`powershell Get-Date`

2. 通过批处理文件调用 `powershell`:
```batch
@echo off
powershell -Command "<command>"
```
例如:`powershell -Command "Get-Date"`

3. 在 `cmd` 中使用 `start` 命令启动 `powershell`:
```cmd
start powershell -NoProfile -Command "<command>"
```
例如:`start powershell -NoProfile -Command "Get-Date"`