安装Citrix接收器VIA PowerShell

时间:2015-07-01 19:05:53

标签: powershell citrix

我正在尝试创建一个安装接收器的脚本,但是我正在让这个弹出框询问我是否确定。

$InstallFiles = "C:\Users\raw.admin\Documents\CitrixReceiver.exe"
$ArgumentList = '/silent /includeSSON enable_SSON=yes enableprelaunch=true allowaddstore=a STORE0="Kiewit;https://apps.kiewit.com/citrix/kiewit/discovery;on"'
Write-host "Installing Citrix receiver"
Start-Process -FilePath $InstallFiles -ArgumentList $ArgumentList -wait
##Make sure Single Sign is in Provider Order Key

$Path = "HKLM:\system\CurrentControlSet\Control\NetworkProvider\Order"

$ProviderOrder = (Get-ItemProperty -path $path).ProviderOrder
If ($ProviderOrder -NotLike "*PnSson*")

{
    Set-ItemProperty -path $path -Name ProviderOrder -value ($ProviderOrder + ",PnSson")
    $NewProviderOrder = (Get-ItemProperty -path $path).ProviderOrder
    Write-Host Provider Order key now has the following values   $NewProviderOrder
}
Else

{
    Write-Host "PnSson already present in Provider Order"
}

Write-host "Installation Complete"

我不希望用户迅速回答是或否的问题。它可以完成还是用户必须忍受的东西?

0 个答案:

没有答案