Link to home
Start Free TrialLog in
Avatar of Kelly Garcia
Kelly GarciaFlag for United Kingdom of Great Britain and Northern Ireland

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
Avatar of Kelly Garcia
Kelly Garcia
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

basically below is my idea:

CSV > Script > Check if tag exists > If not create tags
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks