Converge 2021 is quickly coming! Link below to register! Make sure to attend and learn what you can!
https://web.cvent.com/event/12d83482-96f4-4681-aa80-72e66365e887/summary
Converge 2021 is quickly coming! Link below to register! Make sure to attend and learn what you can!
https://web.cvent.com/event/12d83482-96f4-4681-aa80-72e66365e887/summary
https://docs.citrix.com/en-us/provisioning/current-release/configure/cloud-connector.html
Looks like you can do the PVS on Azure! Get after it!
I’m sure many of you out there like ArcGIS and all that it can do for you! Well, maybe you have it in Citrix. Maybe you have custom SearchOptions.cfg’s. Maybe you have style sheets. Maybe you even like to have viewer and professional license versions available to all your users. Well….. In the long long ago, batch was the thing to power all things like this. What if. Just what if I told you, that powershell works too!? How awesome would that be?! You can upgrade your script from batch and stroll down PoSH street! How about see below and you too, for the low low price of free, can enjoy this method too!
**Fixed an issue with the ESRI_SOFTWARE_CLASS not respecting the Viewer / Professional option. This was tested and the issue is corrected. Change has been made below.** **Made an edit to reduce the number of changes you have to make and make it easier to switch between ArcGIS Desktop versions.**
# This is to launch ESRI ArcGIS in Citrix. This is using PowerShell version 5.1.17763.1971, on Server 2019 hosts, with Citrix UPM, and with ArcGIS 10.8.1 and with Seach Options. You can comment out
# the Search Options if you are not using them.
# Date: 08182021
# This sets the $username variable which will be used to map drives.
$UserName = [Environment]::UserName
# Sets profile server name for Citrix UPM. Enter profile server FQDN.
$profsrv = "profileservername.fqdn"
# Sets ArcGIS Version to be used in the script. There are several references to the version in the script. Enter version in format below.
$arcver = "Desktop10.8"
# Sets license server location. Enter license server FQDN.
$licsrv = "licenserver.fqdn"
# This section is to set the locations for _master if hosting on profile server (You can use whereever the _master location is as long as permissions are set and it is accessible
# from the network the Citrix hosting VDA's are located.You can use other drive letters, just make the change to the variables below and the section on removing drives and remapping.# This is location of "SearchOptions.cfg" files.
# This is location of "SearchOptions.cfg" files.
$Master= "\\$profsrv\GIS\_master"
# Location of ArcCatalog.gx, GxDBFactCache.dat, and GxObjFactCache.dat files.
$Desk= "\\$profsrv\GIS\_desk"
# Location of ArcMap Toolbox and styles.
$Desk1= "\\$profsrv\GIS\_desk1"
# Location of drives for GISDATA.
$QDest = "\\$licsrv\GISDATADRIVE"
$SDest = "\\$licsrv\GISDATADRIVE"
$NDest = "\\nas.fqdn\dfs\sharename"
# This tests to see if the location for the Search Options have previously been created for the user, and creating them if it is not present.
If (!(Test-Path "\\$profsrv\CITRIXUPM\$UserName\UPM_Profile\AppData\Local\ESRI\$arcver\ArcCatalog\SearchIndex\Configs\searchoptions.cfg")) {
Write-Host "Please wait while your Search Options are created..."
robocopy $Master "C:\Users\$UserName\AppData\Local\ESRI\$arcver\ArcCatalog\SearchIndex\Configs" /e /S
}
# This tests to see if the ArcCatalog options have previously been created, and create them if not.
If (!(Test-Path "\\$profsrv\CITRIXUPM\$UserName\UPM_Profile\AppData\Local\ESRI\$arcver\")){
Write-Host "Please wait while your ArcCatalog Options are created..."
robocopy $Desk "C:\Users\$UserName\AppData\Roaming\ESRI\$arcver\ArcCatalog\" /e /S /Y
}
# This tests to see if the ArcCatalog options have previously been created, and create them if not.
If (!(Test-Path "\\$profsrv\CITRIXUPM\$UserName\UPM_Profile\AppData\Local\ESRI\$arcver\")){
Write-Host "Please wait while your ArcCatalog Options are created..."
robocopy $Desk1 "C:\Users\$UserName\AppData\Roaming\ESRI\$arcver\" /e /S /Y
}
# This removes any mapped drives that might previously have been mapped.
Remove-PSDrive Q,S,N –Force -Verbose
# This maps the drives to the locations for ArcGIS data and files.
New-PSDrive -Name Q -PSProvider FileSystem –Root "$QDest"
New-PSDrive -Name S -PSProvider FileSystem –Root "$SDest"
New-PSDrive -Name N -PSProvider FileSystem –Root "$NDest"
# Sets the Class version to "Professional" license use. Comment out the Professional and uncomment the Viewer to change version.
set ESRI_SOFTWARE_CLASS="Professional"
#set ESRI_SOFTWARE_CLASS="Viewer"
# This sets the location of the executable for the ArcGIS files and starts the process.
$dir = "C:\Program Files (x86)\ArcGis\$arcver\bin"
Start-Process $dir\ArcMap.exe
Now this above will get the script for you. But… You have to publish it as well! So, how about them settings!? This is the screenshot of the settings to use to publish it. You will need to go back and change the icon if you want to have it show the ArcGIS icon instead of the powershell icon. For the copy / pasters out there:
Path to the executable file: C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe
Command line arguments: -ExecutionPolicy Bypass c:\appscripts\ArcMapAdv-PS.ps1
Working directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\
So there you have it! A way to launch ArcGIS in Citrix with powershell instead of batch!
Have you ever had machines not reboot properly? Have you had VMs you just don’t know if are awake and ready to serve your hungry customers? Have you ever just wanted to know if they are stepping through their paces? Well, here at XenApplePie, we have a solution for you! For only 35 payments of $0.00, you too can own this piece of automated automation!
But seriously. Sometimes you have a reboot policy set on your Delivery Group, and for some reason that pesky VM just doesn’t want to turn back on (From checking what it does, it looks like the DDC sends a shutdown and then a start command to reboot it). If you have had this happen, it can be frustrating to come in and either your hosting machine is off and users can’t access, or you can have a machine turned up to 11 to support your users. This little script, ran daily, can help prevent such frustrations and symptoms such as: pounding head on desk; shouting to the skies about your fury; verbal diarrhea of expletives not suitable for aural consumption.
Update below to the trim method used. The new method uses the split method versus the substring method. This method will work better as the length of the domain name won’t affect the outcome of the scripts and will save from making edits to the script for each domain. Another edit is for the HTML formatting to make it more readable in the report that is emailed.
So without further ado, well, ado ado ado. Here you go!
# This script was tested with 1912LTSRCU1 using Powershell 5.1.17763.1852 with PowerCLI version VMware PowerCLI 12.2.0 build 17538434 on vSphere 7.x.
# Build Date: 06292021
# https://www.pdq.com/blog/secure-password-with-powershell-encrypting-credentials-part-2/
# The above link contains the method to encrypting the password to use for the script and schedule in task scheduler.
# Loads Citrix snapins (This is assuming you have loaded the Citrix SDK / Studio on the machine that will run the check.)
Add-PSSnapin Citrix*
# vCenter connection section
# This tells PowerCLI to ignore invalid certicate action.
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -DisplayDeprecationWarnings $false -Scope Session -Confirm:$false
# This section is done via the method above in the pdq article for doing powershell scripts with encryption to show how to make the cred file, key file, and encrypt the information.
# The section also from https://notesofascripter.com
$password = Get-Content C:\scripts\creds.txt | ConvertTo-SecureString -Key (Get-Content C:\scripts\creds.key)
$credentials = New-Object System.Management.Automation.PsCredential("domain\username",$password)
Connect-VIServer somevcenteraddress -Credential $credentials
# End https://notesofascripter.com
# This is to get the list of machines from the delivery controller with the filter to get a specific set of machines.
$machines = Get-BrokerMachine -AdminAddress "delivery-controller.domainfqdn:80" -Filter {CatalogName -contains '*some_catalog_name_string*'}|Select-Object -Property machinename, desktopgroupname,inmaintenancemode
# This sets up an array to manipulate
$machine_array = @($machines)
# This goes through the array and removes VMs that have the "inmaintenancemode" value set as "True."
$machines_avail = $machine_array |where-object {$_.inmaintenancemode -ne "true"}
# The output of the Get-Brokermachine will retrieve the "machinename" with the domain preface. This trims the preface domain\servername. This method is better than the previously listed method as it will split at the "\" character, regardless of the length of the domain preface.
$vmtrim = $machine_avail.machinename
$vmtrimmed = (($vmtrim)|%{ ($_ -split '\\')[1]})
# This takes the result of the value above and assigns it to another variable that will be used to power on machines that have powered off.
$vmnames = $vmtrimmed
# This gets the additonal information from the "Get-VM" command and places it in a variable.
$vm = Get-VM $vmnames
# This creates and assigns the output of the "foreach if / else" loop.
# This section was utilized from site "https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-start-multiple-VM-if-poweredOff/td-p/501598."
$output = $vm | foreach {
# This checks to see the value of the "PowerState" being "PoweredOff."
if ($_.PowerState -eq "PoweredOff") {
# This shows a message that a VM was started and generates an output for your report.
"Starting $($_.name) on $($_.VMHost)"
# This starts the VM and captures the output for the report.
$StartingVMs = Start-VM $_ -Confirm:$false
}
else {
# This generates a message for the output for the report if the VM is already running.
"$($_.name) is already running on $($_.VMHost)"
}
}
# HTML Formatting
$style = "<style>BODY{font-family: Arial; font-size: 10pt;}"
$style = $style + "TABLE{border: 1px solid black; border-collapse: collapse;}"
$style = $style + "TH{border: 1px solid black; background: #dddddd; padding: 5px; }"
$style = $style + "TD{border: 1px solid black; padding: 5px; }"
$style = $style + "</style>"
# HTML Email Body
$body = $report | ConvertTo-Html -Head $style
# End of section from "https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerCLI-start-multiple-VM-if-poweredOff/td-p/501598."
# Generates email with attachment.
# This section to end was gotten from assistance from the author of https://notesofascripter.com. This also uses the .NET method of generating the email.
# Notesofascripter section
$date = Get-Date -Format "MM-dd-yyyy"
$emailFrom = "yourserviceemail@company.com"
$emailto = "youremailgroup@company.com"
$subject = "Daily Something Server Check| $date"
$email = New-object System.Net.Mail.MailMessage
$email.to.Add($emailto)
$emailCC = "emailgroup@company.com"
#$email.CC.Add($emailCC)
$Email.From = New-Object system.net.Mail.MailAddress $emailFrom
$email.Subject = $subject
$email.IsBodyHtml = $true
#$attachment = $Reports[1]
#$email.Attachments.add($attachment) If you want to do as attachment
$email.body = $body
$smtpserver="smtp.company.com"
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($email)
;
# End of Notesofascripter section.
# Disconnect from vcenter
Disconnect-VIServer * -confirm:$false
Citrix has announced they entering into an agreement to acquire Wrike! Check below for the news article of das news!
https://www.citrix.com/news/announcements/jan-2021/citrix-announcement.html?fbclid=IwAR32DO5ad9-oba8_Sb9mq7CDnMVcoNaQGojqvwoxi8Z_5xxzgbyI_SR8zj0
Looks like some fun for the new 20H2 of das Windows 10.
Yep…. The Chromium based Edge browser, of which I have actually came to enjoy using, is going to replace the OLD Edge browser in the new 20H2. But…… There’s a catch! Wanna guess!? That’s right… Survey says…… You can’t uninstall it. It is now a part of the collective. AND…. It is the default browser! Whodathunkit!? So something to think about when you be rolling out nice, new and shiny 20H2 on your CVAD VDI. Ok. Now nothing to see here. Move along.
Greetings and such! So there is threat advisory out there abouts on DTLS Amplification DDoS for the ADC. The CTX article right here should lead you the right way with the checking and the remediation for it!
https://support.citrix.com/article/CTX289674
This is something to check and get ahead of so that you don’t run into a potential issue!
We need more power from the warp core! Captain, I’m givin her all she’s got! Ran across something interesting. Something that I should have thought of before but for some reason, I did not. Windows default power management usually is set for balance even on servers. Didn’t think about it being something similar on Linux distros. It appears that is the case! So…… What I found in an issue with some lag and latency, is that Ubuntu and some other distros use ondemand as a CPU scaling governor as the default power scheme. There are a lot of write-ups on the various scaling governor settings available, so I won’t go into all of those. I will show how to set it to performance. I found that CentOS has this as well, but I am working on how to get it set to performance and will add that here as soon as I get the howto on that. This becomes applicable for your Linux VDI that you could be supporting in your Citrix VDI environment and could run into audio issues or are experience lag with multi-core systems.
So here is the way to set the scaling governor to performance on Ubuntu systems. There are two ways depending on if you are running older than 18.04 or newer than 18.04.
For 18.04 Ubuntu and newer:
Open console and type “cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor” to see what it is set to. If it is set to “ondeman,” it is governing the procs. To change to “performance,” type “echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor.” To confirm the change, type “cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor” to make sure it is showing performance.
For earlier than 18.04 Ubuntu: (from https://itectec.com/ubuntu/ubuntu-how-to-set-performance-instead-of-powersave-as-default/)
Open nano or vi and edit /etc/rc.local
and insert these lines before the last line containing exit 0
:
sleep 120 # Give CPU startup routines time to settle.
cpupower frequency-set --governor performance
Happy computing with thy VDI! I’ll post the change for CentOS / RedHat when I have the settings available!
So we have found an interesting issue with CVAD 1912LTSRCU1 and SEP 14.3. Profiles no likey. There is a telemetry service that even if it is not used, it will lock a certain file or two in the C:\users\%username%\AppData\Local\Microsoft\Windows\WER\ReportArchive and ReportQueue and will freeze the profile and won’t allow you to complete the logoff and profile sync. The files are locked by the system and you can’t delete them. This will clear AFTER you reboot the server, but it will prevent the user from accessing again until the reboot occurs as Citrix still sees it logged on.
This is what you need to fix it. It has a good walkthrough of the requirements to fix it! They are working on a solution and should be later this year for it to be available. Stay safe with thy AV software!
Something interested that we found in our environment. We were having to do some reporting and ran into an issue where a username wasn’t being found in the reporting from Director. We had to do some looking and checking profile stores to check the user we thought it might have been and had to compare SIDs to confirm the user was the same. But wait, there is hope! And a fix!
https://support.citrix.com/article/CTX279446
We found that there is a known issue with the Monitor Database not updating in the MonitorDate.User table. It appears to be in 1909 and newer (ref- CVADHELP-14700). Shout out to the person that found this! It saved use some searching and diggin! Reach out to your Citrix contact and request that private fix if you need it!
Powered by WordPress & Theme by Anders Norén