guitaranna.blogg.se

Get list of broker desktop groups citrix studio powershell
Get list of broker desktop groups citrix studio powershell








get list of broker desktop groups citrix studio powershell

Write-Error "Unable to retrieve Delivery Group $DeliveryGroupName.ĮlseIf($? -and $Null -eq $DeliveryGroups) $loadedSnapins += Get-PSSnapin | ForEach-Object ` $LoadedSnapins = arrays of strings, rather than objects, we're passing strings so this will be more robust. [CmdletBinding(SupportsShouldProcess = $False,Ĭopying from the other Citrix related scripts, to check for the required Citrix PowerShell snapins. I looked at all the properties for the three delivery groups created and found what I needed as shown in Figure 5. You may notice the line for the parameter DeliveryGroupName: “This is where the properties DeliveryType equals DesktopsOnly and DesktopKind Specifies the optional output folder to save the output report. This parameter defaults to all Static Desktop Delivery Groups. Use this parameter to specify a single Delivery Group. This is where the properties DeliveryType equals DesktopsOnly and DesktopKind This can be provided as a hostname or an IP address.īy default, the script processes all Delivery Groups that deliver Static desktops.

get list of broker desktop groups citrix studio powershell

Specifies the address of a XenDesktop controller where the PowerShell snapins will

get list of broker desktop groups citrix studio powershell

The three parameters in the help text are shown below.

GET LIST OF BROKER DESKTOP GROUPS CITRIX STUDIO POWERSHELL CODE

Since I have many scripts available at , I have a lot of reusable code at my disposal.

  • Specify a specific delivery group or all delivery groups: -DeliveryGroupName.
  • Not running on the delivery controller: -AdminAddress.
  • We can fix three of the assumptions by using script parameters. Let’s turn this one-liner into a generic script.
  • What if the desktops are not statically assigned?.
  • What happens if the Citrix PSSnapins is not loaded?.
  • What if I want to specify a specific output folder?.
  • What happens if the output folder doesn’t exist?.
  • What if I want to process all static desktop Delivery Groups?.
  • What happens if the Delivery Group name is fat-fingered?.
  • What happens if I don’t run on a delivery controller?.
  • The main fault is it violates a major rule of scripting and programming: Make no assumptions. What is wrong with our one-liner? After all, it works and produces accurate data. How can we turn this one-liner with hard-coded values and assumptions into a generic script that is usable by anyone? This proves the one-liner produces accurate data. The output text file and data from Studio are shown in Figure 4. Get-BrokerMachine -DesktopGroupName "Texas CUGC XL"` Note 2: Use Get-BrokerMachine instead of Get-BrokerDesktop as Citrix deprecated Get-BrokerDesktop. Note: The one-liner is shown on separate lines so the PowerShell code could be read on the PowerPoint slide. Next, we created a one-liner PowerShell “script”. For the static desktops, I logged into three of the five desktops, as shown in Figure 3. One for random desktops, one for static applications, and one for static desktops. In Webster’s Lab (since I can’t show you live customer data), I built three machine catalogs and delivery groups. The data for an unassigned desktop is shown in Figure 2. That showed us the values for IsAssigned and LastConnectionUser for an assigned desktop. To determine the properties needed, we ran: Get-BrokerMachine -DesktopGroupName "The desktop group name" To accomplish this, we used the following process: While waiting for the first published image to build, the customer asked if I could help them with a PowerShell script to get the users for a static desktop delivery group. The week before the CUGC event, I did a Citrix App Layering project for a customer in Dallas. This article shows what I talked about in the second half of my presentation. My presentation was on PowerShell Scripting with Webster. In March 2019, I was honored to present at the first CUGC Texas XL event held at the beautiful University of Texas Club.










    Get list of broker desktop groups citrix studio powershell