如何让 Powershell 等到命令完成后再继续?
How do I make Powershell wait until a command is done before continuing?
我的脚本在安装较新版本之前卸载了 Windows 应用商店应用。我需要确保卸载完成后再安装,那么如何确定我已经等了足够长的时间?
Remove-Appxpackage MyAppName
# ~wait here~
Add-Appxpackage .\PathToNewVersion
我的脚本在安装较新版本之前卸载了 Windows 应用商店应用。我需要确保卸载完成后再安装,那么如何确定我已经等了足够长的时间?
Remove-Appxpackage MyAppName
# ~wait here~
Add-Appxpackage .\PathToNewVersion