Simple True/False VM search??? RRS feed

  • Question

  • Good morning! I'm very much a newbie here... I am looking for a simple PS snippet to check, from a csv list, if a VM exists in my Azure subscription (I don't care about statuses, storage accounts, etc... simply "does the next VM in my list exists or not - return a true or false" - that's it!)

    I have my csv files and have run many scripts to do things like remove DNS entries and ping/connection tests, remove computer accounts from AD, etc, so I get the gist of pulling data from csv files using ForEach... I just need to add a quick look-up in Azure to also check for the existence of a VM before continuing on with the rest of my script... I will be needing to have any existing VM's removed from the list as well, or export all non-existing, returned "False" computer names to another csv...

    Clear as mud?!?  Thanks for any suggestions!


    Monday, June 3, 2019 3:28 PM

All replies