Thursday, April 14, 2011

Citrix Web interface 5.4 unattended installation

Here’s a Powershell script that can be used to perform a simple unattended installation of the Citrix Web Interface.

Import-Module ServerManager
Add-WindowsFeature Web-WebServer, Web-Asp-Net, Web-Net-Ext, Web-ISAPI-Ext,Web-ISAPI-Filter
Add-WindowsFeature Web-Mgmt-Tools, Web-Scripting-Tools, Web-Mgmt-Service, Web-Mgmt-Compat
Add-WindowsFeature AS-NET-FRAMEWORK
Add-WindowsFeature NET-WIN-CFAC
$installing = $false
While(((Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name Like 'Microsoft Visual J# 2.0%'").Name | Group-Object).Count.ToString -eq $null){
  if(-Not $installing){
    Write-Host "`nInstalling Microsoft J#"
    .\vjredist.exe /q:a /c:"install /q"
    $installing = $true
  }
  Start-Sleep -Seconds 2
}
$installing = $false
While(((Get-WmiObject -Query "SELECT * FROM Win32_Product WHERE Name = 'Citrix Web Interface'").Name | Group-Object).Count -eq $null){
  if(-Not $installing){
    Write-Host "`nInstalling Web Interface"
    .\webinterface.exe -q
    $installing = $true
  }
  Start-Sleep -Seconds 2
}
 

1 comment:

  1. this is a great post but how do I break this down if I want to perform IIS isnstall first followed by MS J# and the WI. I would like to have 3 different scripts for thsi and have this logged. I am not a great script guy soany help would be greatly appreciated.

    ReplyDelete