Stéphane Thirion
  • Home
  • Consulting – Raidho
  • homelab
3K
0
0
0
Stéphane Thirion
Stéphane Thirion
  • Home
  • Consulting – Raidho
  • homelab
  • Citrix
  • Microsoft
  • PowerShell
  • Scripting
  • VDI
  • VMware
  • vSphere
  • Windows 2008 R2
  • Windows 2012R2
  • Windows 7
  • XenApp
  • XenDesktop

XenDesktop XenApp 7.x – vmware / ad / delivery group notes and descriptions sync

  • March 30, 2016
  • Stephane Thirion
Total
0
Shares
0
0
0
0
0
0
0

Several times i had the need to synchronise Virtual Machine notes (vmware) with Active Directory Computer description. As in big environment, different team are managing each of these components, the need to be able to link an Active Directory computer account to a vm with XenApp / XenDesktop delivery group has often been seen as useful.

Delivery group name : Desktop123

 

Virtual Machine note (vmware) : Desktop123

 

Active Directory account Description : Desktop123

 

The idea is to simply synchronise the information through the platforms so everyone knows quickly what machine does what. In this particular example that was about XenApp Servers and XenDesktop VDI.

You will need a machine where :

  • XenDesktop 7.x SDK (Powershell is installed)
  • vmware PowerCli installed
  • RSAT role deployed as well
Main_Script.ps1   
Add-PSSnapin Citrix*
Add-PSSnapin vmware*
Import-module ActiveDirectory
Connect-VIServer $vcenter
 
$XDDC = "yourXDControllerFQDN:80"
$vcenter = "yourvCenterFQDN"
 
#Get-BrokerMachine  -AdminAddress $XDDC -Filter "((SessionSupport -eq `"SingleSession`" -or SessionSupport -eq `"MultiSession`"))" -Skip 0 | Select-Object HostedMachineName,DesktopGroupName | Export-Csv $file1 -Delimiter ";" -Encoding UTF8 –NoTypeInformation
 
foreach ($list in (Get-BrokerMachine  -AdminAddress $XDDC -Filter "((SessionSupport -eq `"SingleSession`" -or SessionSupport -eq `"MultiSession`"))" -Skip 0 | Select-Object HostedMachineName,DesktopGroupName)) {
 
    if ($list.HostedMachineName -eq $null) {
 
    Write-Host "No Machine" -ForegroundColor Red
 
    }
 
    Else { Write-Host $list.HostedMachineName -ForegroundColor Green 
 
 
 
Set-VM $list.HostedMachineName -Notes $list.DesktopGroupName -Confirm:$false
Set-ADComputer $list.HostedMachineName -Description $list.DesktopGroupName -Verbose
 
    }
}
 
Disconnect-VIServer $vcenter -Confirm:$false

Thank to Rodolphe Herpeux who simplified the first version of this script I wrote.

Total
0
Shares
Tweet 0
Share 0
Share 0
Share 0
Share 0
Share 0
Share 0
Related Topics
  • automation
  • PowerShell
  • Scripting
  • vmware
  • vSphere
  • XenApp
  • XenDesktop
Stephane Thirion

Previous Article
  • Citrix
  • Experience
  • NetScaler

Netscaler : Invalid argument [ns] error while logon on UI (admin)

  • April 20, 2015
  • Stephane Thirion
View Post
Next Article
  • Citrix
  • Microsoft
  • Provisioning Services
  • Scripting
  • VMware
  • vSphere
  • Windows 7
  • Windows 8
  • XenApp
  • XenDesktop

Expand virtual machines hard disk – automation

  • March 30, 2016
  • Stephane Thirion
View Post
You May Also Like
View Post
  • Experience
  • Linux
  • VMware
  • vSphere

multipathd errors in /var/log/syslog

  • Stephane Thirion
  • August 2, 2022
View Post
  • Citrix
  • CTP
  • Uncategorized

This is the end of an era

  • Stephane Thirion
  • February 16, 2022
View Post
  • VMware
  • vSphere
  • Windows 2022

Migrating FSMO roles Windows 2022 Server

  • Stephane Thirion
  • January 3, 2022
View Post
  • ADC
  • Experience
  • Linux

Cloud yes but no, thanks (there is some Citrix)

  • Stephane Thirion
  • December 7, 2021
View Post
  • Azure
  • Azure
  • PowerShell
  • Scripting
  • Security

Export all Admin Roles and members from Azure AD

  • Rodolphe Herpeux
  • March 25, 2021
View Post
  • RDS
  • Security
  • Windows 2016

RDS access to applications with second authentication factor by smartcard

  • Rodolphe Herpeux
  • January 7, 2021
View Post
  • Windows 2016
  • Windows 2019

Migration farm ADFS operating system Windows server 2016 to Windows server 2019

  • Rodolphe Herpeux
  • January 6, 2021
View Post
  • Windows 2016

Migrate ADFS configuration Database from WID to MS-SQL

  • Rodolphe Herpeux
  • January 5, 2021
vmware
Coinbase – Affiliated link
Blog Stats
  • 1,237,142 hits
Categories
  • Amazon (1)
  • Apple (20)
    • iOS (5)
    • Mac OSx (11)
  • ArchY.net Site (30)
  • Azure (8)
  • Certifications (3)
  • Citrix (207)
    • ADC (1)
    • Citrix Virtual Apps and Desktops (3)
    • NetScaler (12)
    • Password Manager (3)
    • Personal vDisk (5)
    • Power and Capacity Management (3)
    • Provisioning Services (22)
    • Receiver (29)
    • ShareFile (8)
    • Single Sign On (3)
    • SmartAuditor (2)
    • Storefront (12)
    • Synergy (25)
    • User Profile Management (2)
    • VDI (7)
    • WebInterface (21)
    • XenApp (84)
    • XenApp Plugin (3)
    • XenClient (10)
    • XenDesktop (55)
    • XenServer (42)
  • Cloud (12)
  • Crystal Ball (2)
  • CTP (13)
  • Docker (2)
  • Events (35)
    • E2E – PubForum (9)
    • Geek Speak (3)
  • Experience (53)
  • Kubernetes (2)
  • Licensing (3)
  • Linux (12)
  • Microsoft (145)
    • Azure (8)
    • Office365 (4)
    • PowerShell (18)
    • RDS (5)
    • Windows 10 (6)
    • Windows 2003 (21)
    • Windows 2008 (20)
    • Windows 2008 R2 (54)
    • Windows 2012 (13)
    • Windows 2012R2 (13)
    • Windows 2016 (18)
    • Windows 2019 (4)
    • Windows 2022 (1)
    • Windows 7 (27)
    • Windows 8 (19)
    • Windows Virtual Desktop (1)
    • Windows XP (11)
  • News (5)
  • Raidho (2)
  • Raspberry (3)
  • Scripting (13)
  • Security (4)
  • Slide Deck (1)
  • Thin Clients (3)
  • Twitter (1)
  • Ubiquiti (1)
  • Uncategorized (12)
  • VMware (27)
    • VMWare WorkStation (2)
    • vSphere (15)
Stéphane Thirion
Don't Follow the Trend

Input your search keywords and press Enter.

 

Loading Comments...