Jump to content
Welcome to our new Citrix community!
  • 0

create tags from csv file


Adam Budwig

Question

1 answer to this question

Recommended Posts

  • 0
$Tags = Import-Csv -Path c:\temp\Tags.csv
$Domain = "DOMAIN" #NETBIOS
$Machines = @("VDA1","VDA2")

Add-PSSnapin -Name Citrix*

foreach ($Tag in $Tags) {
    New-BrokerTag $Tag.Name -Verbose
    foreach ($Machine in $Machines) {
        $MachineUID = (Get-Brokermachine -MachineName "$Domain\$Machine").Uid
        Add-BrokerTag -Name $Tag.Name -Machine $MachineUID -Verbose
    }
}

 

CSV Import file like this

Quote

Name
Bob
Burt
Harry

 

add error handling as required

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...