Citrix PVS Server Tweaks

  • Streaming Port re-configured from 6910 to 6968 (default 6910 – 6930).
  • Threads per port set to match the vCPU number.
    VM level set virtual sockets to vCPU number and the cores per socket to one.
  • Leave the rest advanced options to be unchanged.

Ref:

  1. https://www.citrix.com/blogs/2016/03/30/updated-guidance-on-pvs-ports-and-threads/
  2. https://blogs.vmware.com/vsphere/2013/10/does-corespersocket-affect-performance.html

 

Delay VDA registration for XenDestop/Xenapp

Step 1: Disable BrokerAgent Service from services.msc on the worker VM.
Step 2: Create schedule task for enabling BrokerAgent and starting the service after 15 mins of system start on the worker VM.
VDA-DelayRegistrationTrigger-Taskschd
VDA-DelayRegistrationAction-Taskschd
Note: Use system account to run this task.
Step 3: Increase the RegistrationDelay timeout on the DDC/Brokers to 30 mins (Default: 20 mins)
HKEY_LOCAL_MACHINE\Software\Citrix\DesktopServer\MaxRegistrationDelayMin DWORD 30

Period after which a power-managed VM started by the broker service, but which does not subsequently register with a DDC, is shutdown.

Reboot Wyse ThinOS device outside WDM

Step 1: Enable SNMP via Global INI

Service=snmpd disable=no
community=public

Note: Reboot the wyse client after the ini is set.

Step 2: Send reboot command via snmpset

snmpset.exe -r:10.20.30.15 -c:"public" -o:.1.3.6.1.4.1.714.1.2.6.1.1.0 -val:0 -tp:int

for snmpset please visit https://syslogwatcher.com/cmd-tools/snmp-set/

Reboot immediately -val:0 

Reboot with a minute delay -val:1

Parameters

-r:host Name or network address (IPv4/IPv6) of remote host.
-c:community SNMP community string for SNMP v1/v2c. Default: private
-o:var_oid Object ID (OID) of SNMP variable to SET.
-val:value Variable value to SET.
-tp:type Type of variable to SET. Supported: int,uint,str,hex,oid,ip.
Default: str

Works on ThinOS 8.4

VMware View Reset DesktopVM via Powershell

Problem: Can’t reset multiple VMs at one time via admin portal​ page based on session duration.
View PowerCLI snippt to reset non responding machines what are stuck in disconnected state for more than a 24 hrs

Get-RemoteSession -State Disconnected | ? {$_.duration -like "*day*"} | % {Get-DesktopVM -Name $_.DNSName.Split(".")[0] | Send-VMReset}

View PowerCLI snippt to reset non responding machines what are stuck in disconnected state for more than a 9 hrs

Get-RemoteSession -State Disconnected | ? {$_.duration -like "*hours*"} | ? {([int]$_.duration.split("hours")[0].trim() -gt 9) } | % {Get-DesktopVM -Name $_.DNSName.Split(".")[0] | Send-VMReset}

vSphere Export VMName and MacAddress

Get VMs begining with DC2-GEN-V62 and use Get-NetworkAdapter for MAC address with powershell expression

connect-viserver vsphere01
get-vm DC2-GEN-V62* | Select @{Expression={$_.Name};Label="VM Name"},@{Expression={$(Get-NetworkAdapter -VM $_.Name).MacAddress};Label="Mac Address"} | Export-csv c:\tmp\DC2-GEN-V62_MACs.csv

Just display with out export to CSV

connect-viserver vsphere01
get-vm DC2-GEN-V62* | Select @{Expression={$_.Name};Label="VM Name"},@{Expression={$(Get-NetworkAdapter -VM $_.Name).MacAddress};Label="Mac Address"}

Publish Outlook 2016 in XenApp

Download Office 2016 Administrative Template files and import ADML and ADMX files to C:\windows\PolicyDefinitions
GPO settings below are just a recommendation, Please review and pick  ones that apply to you.

  1. Computer Configuration/Administrative Templates/Microsoft Office 2016 (Machine)/Updates
    Enable Automatic Updates > Disable
  2. User Configuration/Administrative Templates/Microsoft Office 2016/First Run
    Disable First Run Movie > Enable
    Disable Office First Run on application boot > Enable
  3. User Configuration/Administrative Templates/Microsoft Office 2016/Miscellaneous
    Block signing into Office > Enabled
    Do not use hardware graphics acceleration > Enabled
    Show OneDrive Sign In > Disabled
    Suppress recommended settings dialog > Enabled
  4. User Configuration/Administrative Templates/Microsoft Office 2016/Privacy/Trust Center
    Allow including screenshot with Office Feedback > Disabled
    Automatically receive small updates to improve reliability > Disabled
    Disable Opt-in Wizard on first run > Enabled
    Enable Customer Experience Improvement Program > Disabled
    Send Office Feedback > Disabled
    Send personal information > Disabled
  5. User Configuration/Administrative Templates/Microsoft Office 2016/Security Settings/Trust Center/Trusted Catalogs
    Block the Office Store > Enabled
  6. User Configuration/Administrative Templates/Microsoft Outlook 2016/Account Settings/Exchange
    Automatically configure profile based on Active Directory Primary SMTP address > Enabled
  7. User Configuration/Administrative Templates/Microsoft Outlook 2016/Account Settings/Exchange/Cached Exchange Mode
    Use Cached Exchange Mode for new and existing Outlook profiles > Disabled
  8. User Configuration/Administrative Templates/Microsoft Outlook 2016/Outlook Options/Other
    Hide the Office Store button > Enabled
  9. User Configuration/Administrative Templates/Microsoft Outlook 2016/Outlook Options/Preferences/Search Options
    Prevent installation prompts when Windows Desktop Search component is not present > Enabled
  10. GPO Reg preferences (Optional), this hides the search disabled warning
    HKCU:\Software\Microsoft\Office\16.0\Outlook\Options\General
    PONT_STRING=53,

Stop the install prompts when loading outlook
Office2016-InstallPrompts-onLaunch

  1. Add-WindowsFeature -Name Search-Service
  2. Stop-Service -Name WSEARCH
  3. Set-Service -Name WSearch -StartupType Disabled

 

Netscaler two arm deployment (multiple network interfaces)

Collection of useful information
NS-LogicalView
ref > https://www.citrix.com/content/dam/citrix/en_us/documents/products-solutions/citrix-netscaler-and-citrix-xendesktop-7-deployment-guide.pdf
 

  1. http://www.carlstalhood.com/netscaler-11-system-configuration/#twoarm
  2. http://discussions.citrix.com/topic/334929-add-2nd-nic-to-netscaler-101-vpx-for-external/
  3. Binding-Multiple-IP-Addresses-to-an-Interface-of-a-NetScaler-Appliance
    http://support.citrix.com/article/CTX117345
  4. http://www.citrixguru.com/2015/09/08/lab-part-5-netscaler-11-architecture-and-installation/

 

XenApp 6x – Export Application list with Published Servers

Add-PSSnapin *citrix*
Get-XAApplicationReport *  | Select BrowserName, {($_.ServerNames | Sort) -join ", "} | Export-csv c:\tmp\XA65-AppReport.csv


Making report more pretty:
open csv with excel and perform replace CTRL + H, Find “, ” Replace with hold the ALT key down and then press 010 on the number pad.
ref – http://www.exceldashboardtemplates.com/how-to-find-and-replace-a-hard-return-in-an-excel-spreadsheet/

Powershell Format Operator (-f)

Padding Prefix
PS C:\Users\User> 1..10 | % { “{0:d2}” -f $_}
01
02
03
04
05
06
07
08
09
10
Space Padding

PS C:\Users\User> 1..10 | % { "{0,5}" -f $_}
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10

Number of decimal places
PS C:\Users\User> 1..10 | % { “{0:n2}” -f $_}
1.00
2.00
3.00
4.00
5.00
6.00
7.00
8.00
9.00
10.00
Percentage
PS C:\Users\User> 1..10 | % { “{0:p2}” -f ($_/4)}
25.00 %
50.00 %
75.00 %
100.00 %
125.00 %
150.00 %
175.00 %
200.00 %
225.00 %
250.00 %
Ref – https://blogs.technet.microsoft.com/pstips/2014/10/18/powershells-format-operator/