Kelly Garcia
asked on
CSV Powershell Script for Tags
Hi All,
I have these thousands of tag i need to apply to vms running in both azure and aws: below is an example of tag - values:
BusinessUnit: TestBusinessunit
Owner: KellyG
CostCentreCode: kellycostcentre
Name: KellyTestTagName
ApplicationID: KellyApplicationID
Functionality: functionalitytag
Environment: envronmenttag
Schedule: 10/10/2010
Monitoring: yes
Geography: Geographytag
ExternallyManaged: Managed by oup
Backups: Backed up to Azure RSV
the tags will have different values per resource, example owner:kelly, owner: Sandy,etc.
if tag already exists , we need a log it, etc.
whats the best way to approach this via powershell script. so far my idea is to store the values in csv then from csv produce into a hash table then create a function to apply the tags.
please help. just an overview of how to do this will be great.
reagards,
kelly
I have these thousands of tag i need to apply to vms running in both azure and aws: below is an example of tag - values:
BusinessUnit: TestBusinessunit
Owner: KellyG
CostCentreCode: kellycostcentre
Name: KellyTestTagName
ApplicationID: KellyApplicationID
Functionality: functionalitytag
Environment: envronmenttag
Schedule: 10/10/2010
Monitoring: yes
Geography: Geographytag
ExternallyManaged: Managed by oup
Backups: Backed up to Azure RSV
the tags will have different values per resource, example owner:kelly, owner: Sandy,etc.
if tag already exists , we need a log it, etc.
whats the best way to approach this via powershell script. so far my idea is to store the values in csv then from csv produce into a hash table then create a function to apply the tags.
please help. just an overview of how to do this will be great.
reagards,
kelly
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
ASKER
CSV > Script > Check if tag exists > If not create tags