- I am creating a runbook for automating a monotonous DB task.
- My master.csv file gets updated every hour with the details of all the resources in our Infrastructure and is placed in an Azure file storage system.
- I am trying to take the name of a resource(DB) as an input from a user and verify if it exists on my Azure infrastructure by checking against a master inventory file.
My main concern is if I will be able to get the contents of this CSV(<100KB) in a variable so that I use it for comparison in the subsequent step?
I have tried the below code:
The file is present at {StorageContainer}/a/b/{filename}.csv
$inventory = import-csv {storageaccntname}/a/b/{filename}.csv
$inventory = import-csv https://{storagecontainername}/a/b/{filename}.csv
$inventory = import-csv {random drive letters like C:,D:,E:}/a/b/{filename}.csv (Don't think these even exist for an azure file storage)
All resulting in file not found error.
I also had a look at the Get-AzureStorageFileContent command however this seems to download the whole file at a destination (doesn't serve the purpose).