本文介绍了与winrm 2017无人值守安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试用winrm安装visual studio remote,不幸的是打破了安装程序而没有任何错误记录。如果我在本地运行相同的脚本,则installatioin运行没有问题。 


操作系统:Windows 10


vs_installer_version:  15.3.0预览3.0


本地脚本:


Invoke-Command  -ScriptBlock { 

cd C:\ vs2017_15_3_testinstaller \

cmd / c vs_professional.exe -q --wait  - 添加Microsoft.VisualStudio.Workload.ManagedDesktop - 添加Microsoft.VisualStudio.Workload.NetCoreTools

}


我的脚本远程:


$ Username ='vs_user'

$ Password ='### ##'

$ pass = ConvertTo-SecureString -AsPlainText $ Password -Force

$ Cred = New-Object System.Management.Automation.PSCredential -ArgumentList $ Username,$ pass

Invoke-Command  -ScriptBlock { 

cd C:\ _vs2017_15_3_testinstaller \

cmd / c vs_professional.exe - q --wait  - 添加Microsoft.VisualStudio.Workload.ManagedDesktop - 添加Microsoft.VisualStudio.Workload.NetC oreTools

} - 计算机名称192.168.147.161  -Credential $ Cred 


解决方案

I try to install the visual studio remote with winrm, unfortunately breaks the installer without any error to log. If I run the same script locally, the installatioin runs without problems. 

OS: Windows 10

vs_installer_version: 15.3.0 Preview 3.0

my script locally :

Invoke-Command  -ScriptBlock{ 
cd C:\vs2017_15_3_testinstaller\
cmd /c vs_professional.exe -q --wait  --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetCoreTools
}

my script remote :

$Username = 'vs_user'
$Password = '#####'
$pass = ConvertTo-SecureString -AsPlainText $Password -Force
$Cred = New-Object System.Management.Automation.PSCredential -ArgumentList $Username,$pass
Invoke-Command  -ScriptBlock{ 
cd C:\vs2017_15_3_testinstaller\
cmd /c vs_professional.exe -q --wait  --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetCoreTools
} -ComputerName 192.168.147.161  -Credential $Cred 

解决方案


这篇关于与winrm 2017无人值守安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-10 07:43