Provisioning Server 7.x Silent Setup
Installation
Zum Beginn des Setups deaktivieren wir den Check for Publisher’s Certificate Revocation, um den Aufruf der Konsolen zu beschleunigen.
Set-ItemProperty -path "REGISTRY::\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\WinTrust\Trust Providers\Software Publishing\" -name State -value 146944
Zur Installation von Provisioning Services verbinden wir uns das entpackte ISO als Netzlaufwerk und installierten mit lokaler SQL Datenbank. Neben den Server-Komponenten installieren wir auch die Management Konsole lokal auf der Maschine. Voraussetzung ist, dass vorher alle Pre-Requirements (ASP.NET, GPMC, etc.) installiert wurden.
write-host "Configuring Setup ..." New-Item C:\Logs\PVS -ItemType directory $pvsSource = Read-Host -Prompt 'PVS Setup root directory (with "\"): ' $pvsSourceServer = $pvsSource + "Server" $pvsSourceConsole = $pvsSource + "Console" write-host "Installing Citrix Provisioning Services Server ..." cd $pvsPathServer .\PVS_Server_x64.exe /s /v"/qn /l C:\Logs\PVSServer.log" write-host "Installing Citrix Provisioning Services Console ..." cd $pvsPathConsole .\PVS_Console_x64.exe /s /v"/qn /l C:\Logs\PVSConsole.log" write-host "Registering Citrix Provisioning Services PowerShell SnapIn ..." cd 'C:\Program Files\Citrix\Provisioning Services Console' "C:\Windows\Microsoft.NET\Framework\<.NET-Version>\installutil.exe" Citrix.PVS.SnapIn.dll /LogFile="C:\Logs\PVS\PVSPowerShell32.log" "C:\Windows\Microsoft.NET\Framework64\<.NET-Version>\installutil.exe" Citrix.PVS.SnapIn.dll /LogFile="C:\Logs\PVS\PVSPowerShell64.log" Restart-Computer -Force
Konfiguration
Eine neue PVS Farm kann aktuell noch nicht über die PowerShell konfiguriert werden. Daher muss dies wie gewohnt manuell über den Configurator erledigt werden oder über ConfigWizard.exe
mit einer Antwortdatei.
Die Antwortdatei kann entweder manuell erstellt werden oder mit der ConfigWizard.exe:
"C:\Program Files\Citrix\Provisioning Services\ConfigWizard.exe /s
Die Antwortdatei ConfigWizard.ans
liegt dann unter C:\ProgramData\Citrix\Provisioning Services\
und sieht (je nach Eingaben) wie folgt aus:
IPServiceType=0 PXEServiceType=0 FarmConfiguration=1 DatabaseServer=<SQL-Server-FQDN> DatabaseInstance= MultiSubnetFailover=0 DatabaseNew=<PVS-DB-Name> FarmNew=Farm SiteNew=<Site-Name> CollectionNew=<Devicecollection-Name> ADGroup=<Domain>/Builtin/Administrators Store=Store DefaultPath=<Path-to-vDisk-Store> LicenseServer=<License-Server-FQDN> LicenseServerPort=27000 UserName=<Domain>\<SQL-Admin> UserName2=<SQL-Admin-Password> PasswordManagementInterval=7 StreamNetworkAdapterIP=<PVS-Stream-IP> ManagementNetworkAdapterIP=<PVS-Management-IP> IpcPortBase=6890 IpcPortCount=20 SoapPort=54321 BootstrapFile=C:\ProgramData\Citrix\Provisioning Services\Tftpboot\ARDBP32.BIN LS1=10.10.10.1,10.10.10.2,10.10.10.3,6910 AdvancedVerbose=0 AdvancedInterruptSafeMode=0 AdvancedMemorySupport=1 AdvancedRebootFromHD=0 AdvancedRecoverSeconds=50 AdvancedLoginPolling=5000 AdvancedLoginGeneral=30000 SSLPort=54323 SSLCert=<SSL-Certificate> CisUserName= CisPassword=
Danach kann die PVS-Farm mit Hilfe der Antwortdatei wie folgt konfiguriert werden (die Ordner für den Store müssen manuell mit angelegt werden):
New-Item -ItemType directory -Path <Path-to-vDisk-Store> New-Item -ItemType directory -Path <Path-to-vDisk-Store>\Cache "C:\Program Files\Citrix\Provisioning Services\ConfigWizard.exe" /a "C:\ProgramData\Citrix\Provisioning Services\ConfigWizard.ans"
Nach Abschluss des Setups kann der Server-/Deployment-Status wie folgt geprüft werden:
Get-PvsServerInfo
Zusätzliche Konfigurationen können danach wieder mit PowerShell CmdLets durchgeführt werden (Sites, Stores, XenServer Hosting Connections, Device-Collections, Devices, vDisks, etc.).
Add-PSSnapin citrix* $Server = pvs01.domain.com $Site = site-nn $Store = store-nn $Pool = xensrv_pool-nn $StorePath = D:\Stores\store-nn $StoreCachePath = D:\Stores\store-nn\Cache $Collection = devicecollection-nn $Device = device-nn $Disk = vdisk-nn #Create new Site New-PvsSite -SiteName $Site #Create new Virtual Hosting Pool New-PvsVirtualHostingPool -PoolName $Pool -SiteName $Site -Server <XSPool-Master> -UserName <XSPool-Admin> -Password <XSPool-Password> #Create new Store New-PvsStore -StoreName $Store -SiteName $Site -Path $StorePath -CachePath $StoreCachePath #Create new Device Collection New-PvsCollection -SiteName $Site -CollectionName $Collection #Create new Device New-PvsDevice -SiteName $Site -CollectionName $Collection -DeviceName $Device -DeviceMac "<MAC-Address>" #Create new vDisk in VHDX-Format Start-PvsCreateDisk -Name $Disk -Size "<Size-in-MB>" -StoreName $Store -ServerName $Server -SiteName $Site -VHDX #Assign vDisk to a Device Collection Add-PvsDiskLocatorToDevice -SiteName $Site -StoreName $Store -DiskLocatorName $Disk -CollectionName $Collection -RemoveExisting #Assign vDisk to a single Device only #Add-PvsDiskLocatorToDevice -SiteName $Site -StoreName $Store -DiskLocatorName $Disk -DeviceName $Device -RemoveExisting
…