Citrix Cloud (DaaS) Documentation Script V1.26 (FINAL update by Webster)

Version 1.26 23-Jun-2023

Updated 30-Jun-2023 with information from Citrix that they gave me permission to include.

It has been an honor and a privilege to provide this script to you since 21-Sep-2020.  Shane O’Neill, this script is now all yours.

  • In version 1.26, I am commenting out the catalog and machine VDA Upgrade  Service sections because the Get-VusCatalogInfo and Get-VusMachineInfo  cmdlets were not supposed to be made public. I added them to this script 11  months ago and now Citrix removed the cmdlets.
  • Added Computer policy
    • Profile Management\Advanced settings\Disable defragmentation for VHD  disk compaction
    • Profile Management\Advanced settings\Enable user-level policy settings
    • Profile Management\Advanced settings\Set priority order for user groups
    • VDA Data Collection\Security\Clipboard place metadata collection for  Security monitoring
    • Added to Function OutputZoneSiteView:
      • Valid Edge Servers?
      • Healthy? (Is the Zone healthy?)
      • Primary? (Is the Zone the Primary Zone? There can (should) only be one  Primary Zone.)
      • Information from Citrix.
      • 1. What is a valid edge server?
      • “HasValidEdgeServers” is a property of Zone objects. A Zone has valid  EdgeServers if there are any EdgeServers in that Zone. NOTE: The presence of the edge server record is dependent on the edge server data being returned from Citrix Cloud with sufficient/correct data such as the presence of a SID value for the edge server.
      • Edge servers that do not have known SID values or cannot determine the  AD domains could be possibly seen as ‘invalid’.
      • 2. How do I fix an invalid edge server?
      • See response to #1.
      • 3. What makes a zone healthy?
      • A Zone is considered healthy if any of the EdgeServers in that Zone are healthy (i.e., not in LHC outage mode).
      • 4. What is an unhealthy Zone?
      • A Zone is considered unhealthy if all of the EdgeServers in that Zone are unhealthy (i.e., in LHC outage mode).
      • 5. How do I fix an unhealthy Zone?
      • Once an EdgeServer comes out of LHC outage mode, the Zone’s  “IsHealthy” property should change to “true”.
      • LHC is designed to operate automatically, without the need for admin intervention. If a Zone’s “IsHealthy” property is “false” for an extended period of time, you can check whether there are any ongoing networking issues and/or reach out to Citrix customer support.
      • End of Information from Citrix.
    • Added two more settings configurable by Set-BrokerServiceConfigurationData
      • Core.AssignmentPolicyMaxDesktops
        • Type: int
        • Default: 5
        • Info: Minimum=1, Maximum=100
        • Summary: The maximum value accepted for the MaxDesktops parameter of the New/Set-BrokerAssignmentPolicyRule cmdlets. This is limited here because enumeration creates MaxDesktops AOFU resources – which if inadvertently set to a very large value impacts enumeration performance and also consumes large amounts of memory.
    • Core.SetSiteDataPeriodSecs
      • Type: int
      • Default: 600
      • Info: Seconds, Minimum=30
      • Summary: The period in seconds for polling for updates to the site data.
    • Lhc.OutageSummaryEventIntervalSecs
      • Type: int
      • Default: 120
      • Info: Seconds Minimum=60
      • Summary: The interval at which LHC would refresh the outage summary event.
    • LhcState.PeerStatus
      • Type: string
      • Default:
      • Info:
      • Summary: The status information of peers participating in election process.
  • In Function OutputMachines, for ProvisioningType -eq “MCS” added:
    • Device Management Type – This can be Intune, IntuneWithCitrixTags, or None
    • Identity Type – This can be ActiveDirectory, AzureAD, HybridAzureAD, or  Workgroup
    • Master Image VM Date – The date and time when the VM snapshot copy used  by the provisioning scheme was made
    • MDM Enrollment – This can be Intune, IntuneWithCitrixTags, or None
    • Prepared Image Definition Name – The name for the image definition used for  the provisioning scheme
    • Prepared Image Version Number – The version number for the image version  used for the provisioning scheme
    • Windows Activation Type – Windows Activation Type set on the Master Image  which has a mapping with the Provisioning Scheme
  • In Function OutputMachines:
    • Made the code consistent between the Daas and CVAD scripts
    • Added missing fields that were in one script but not the other
    • Added the Machine data metadatamap keys output that was in the Word  output but not in the Text and HTML output
    • Added Custom Properties For VMware
      • FolderId
    • Renamed “Master VM” to “Master Image VM”
  • Removed the IncludeVMImageHistory parameter as it wasn’t used
  • Renamed Computer policy
    • VDA Data Collection\VDA data collection for Performance Analytics to VDA  Data Collection\VDA data collection for Analytics
  • Tested with Group Policy Module 2305 dated May 31, 2023
  • Tested with PoSH SDK dated May 18, 2023
  • Updated for 7.38

You can always find the most current script by going to https://www.carlwebster.com/where-to-get-copies-of-the-documentation-scripts/

Thanks

Webster

2 Comments

  1. GOTTI

    Hi Carl,

    On my side i have an issue with the script, here is the return

    PS D:\DaaS\Scripts> ./CC_Inventory_V1.ps1 -ProfileName “OneIQEQ”
    This is an elevated PowerShell session
    VERBOSE: 10/22/2024 10:20:38 AM: Testing output parameters
    VERBOSE: 10/22/2024 10:20:38 AM: HTML is set
    Attempting to authenticate using the profile named OneIQEQ
    VERBOSE: __AllParameterSets
    VERBOSE: Get-XDAuthentication: Enter
    VERBOSE: invoking Get-XDAuthenticationEx:
    VERBOSE: Get-XDAuthentication: Exit
    Successfully authenticated using the profile named OneIQEQ. Attempting to get the CustomerId.

    VERBOSE: __AllParameterSets
    Successfully retrieved the CustomerId:

    VERBOSE: Performing the operation “Set Alias” on target “Name: gcim Value: Get-CimInstance”.
    VERBOSE: Performing the operation “Set Alias” on target “Name: scim Value: Set-CimInstance”.
    VERBOSE: Performing the operation “Set Alias” on target “Name: ncim Value: New-CimInstance”.
    VERBOSE: Performing the operation “Set Alias” on target “Name: rcim Value: Remove-cimInstance”.
    VERBOSE: Performing the operation “Set Alias” on target “Name: icim Value: Invoke-CimMethod”.
    VERBOSE: Performing the operation “Set Alias” on target “Name: gcai Value: Get-CimAssociatedInstance”.
    VERBOSE: Performing the operation “Set Alias” on target “Name: rcie Value: Register-CimIndicationEvent”.
    VERBOSE: Performing the operation “Set Alias” on target “Name: ncms Value: New-CimSession”.
    VERBOSE: Performing the operation “Set Alias” on target “Name: rcms Value: Remove-cimSession”.
    VERBOSE: Performing the operation “Set Alias” on target “Name: gcms Value: Get-CimSession”.
    VERBOSE: Performing the operation “Set Alias” on target “Name: ncso Value: New-CimSessionOption”.
    VERBOSE: Performing the operation “Set Alias” on target “Name: gcls Value: Get-CimClass”.
    VERBOSE: 10/22/2024 10:20:43 AM: Testing required PowerShell modules for Citrix Cloud
    VERBOSE: Cannot verify the Microsoft .NET Framework version 4.7.2 because it is not included in the list of permitted
    versions.
    VERBOSE: Loading module from path ‘C:\Program
    Files\Citrix\CloudPowerShellModules\Citrix.PoshSdkProxy.Commands\Citrix.PoshSdkProxy.Commands.psm1’.
    VERBOSE: 10/22/2024 10:20:43 AM: Importing required Citrix PowerShell modules
    VERBOSE: 10/22/2024 10:20:43 AM: Citrix.ADIdentity.Commands
    VERBOSE: 10/22/2024 10:20:45 AM: Citrix.Analytics.Commands
    VERBOSE: 10/22/2024 10:20:46 AM: Citrix.AppLibrary.Commands
    VERBOSE: 10/22/2024 10:20:46 AM: Citrix.Broker.Commands
    VERBOSE: 10/22/2024 10:20:47 AM: Citrix.Common.Commands
    VERBOSE: 10/22/2024 10:20:48 AM: Citrix.Configuration.Commands
    VERBOSE: 10/22/2024 10:20:49 AM: Citrix.ConfigurationLogging.Commands
    VERBOSE: 10/22/2024 10:20:50 AM: Citrix.DelegatedAdmin.Commands
    VERBOSE: 10/22/2024 10:20:50 AM: Loading Citrix.GroupPolicy.Commands module
    VERBOSE: Loading module from path ‘C:\Program
    Files\Citrix\PowerShellModules\Citrix.GroupPolicy.Commands\Citrix.GroupPolicy.Commands.psd1’.
    VERBOSE: Loading ‘Assembly’ from path ‘C:\Program Files\Citrix\GroupPolicy\GpDataModel.dll’.
    VERBOSE: Loading ‘Assembly’ from path ‘C:\Program Files\Citrix\GroupPolicy\GpDataModel.dll’.
    VERBOSE: Loading ‘Assembly’ from path ‘C:\Program Files\Citrix\GroupPolicy\GpUtilities.dll’.
    VERBOSE: Loading ‘Assembly’ from path ‘C:\Program Files\Citrix\GroupPolicy\GpUtilities.dll’.
    VERBOSE: Loading ‘Assembly’ from path ‘C:\Program
    Files\Citrix\CloudPowerShellModules\lib\net472\Citrix.Diagnostics.Tracing.dll’.
    VERBOSE: Loading ‘Assembly’ from path ‘C:\Program
    Files\Citrix\CloudPowerShellModules\lib\net472\Citrix.Diagnostics.Tracing.dll’.
    VERBOSE: Loading ‘Assembly’ from path ‘C:\Program Files\Citrix\GroupPolicy\HtmlAgilityPack.dll’.
    VERBOSE: Loading ‘Assembly’ from path ‘C:\Program Files\Citrix\GroupPolicy\HtmlAgilityPack.dll’.
    VERBOSE: Loading module from path ‘C:\Program Files\Citrix\GroupPolicy\GpProvider.dll’.
    Import-Module : A drive with the name ‘Templates’ already exists.
    At D:\DaaS\Scripts\CC_Inventory_V1.ps1:38503 char:2
    + Import-Module Citrix.GroupPolicy.Commands
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ResourceExists: (Templates:String) [Import-Module], ProviderInvocationException
    + FullyQualifiedErrorId : DriveAlreadyExists,Microsoft.PowerShell.Commands.ImportModuleCommand

    VERBOSE: Exporting cmdlet ‘Export-CtxGPTemplate’.
    VERBOSE: Exporting cmdlet ‘Import-CtxGPTemplate’.
    VERBOSE: Importing cmdlet ‘Export-CtxGPTemplate’.
    VERBOSE: Importing cmdlet ‘Import-CtxGPTemplate’.
    ProcessScriptSetup : Unable to add the Citrix.GroupPolicy.Commands module. Script cannot continue.
    At D:\DaaS\Scripts\CC_Inventory_V1.ps1:39259 char:1
    + ProcessScriptSetup
    + ~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,ProcessScriptSetup

    VERBOSE: 10/22/2024 10:20:51 AM: Script has been aborted
    PS D:\DaaS\Scripts>

    • Carl Webster

      Yep, exact same problem I ran into. You need to install the VC++ Runtimes.

      From the ReadMe file.

      5. Install the Citrix Group Policy Management Console
      a. NOTE: The Visual C++ Runtimes MUST be installed BEFORE the Group Policy Management Console.

      I also updated the error message in my final update.

      *******************************************************************************************
      LocalSiteGPO PSDrive was not created, which should not have happened. Turning Policies off.

      Are the two Visual C++ Runtimes installed?

      Verify that the Visual C++ Runtimes are installed.

      Install from the Microsoft download page
      https://aka.ms/vs/17/release/vc_redist.x86.exe (install first)
      https://aka.ms/vs/17/release/vc_redist.x64.exe

      Please see the ReadMe file:
      https://carlwebster.sharefile.com/d-s1ef10b6883eb473fa2f4eef00be83799
      *******************************************************************************************

      Webster

Comments are closed