Bulk edit of VM descriptions in VMM RRS feed

  • Question

  • Hello All,

    I am attempting to do a bulk edit of all of the descriptions for the VM's in my SCVMM environment to standardize the formatting. So far, I am able to export the VM name and description fields to a csv file with powershell using the below command.
    Get-SCVirtualMachine | ft name, description | Export-CSV C:\temp\VMdescriptions.csv
    I would then like to edit these descriptions and then using powershell, somehow overwrite the description field for all of the VM's using this same csv file. 
    I know the syntax to edit one VM, but I cant seem to figure out how to do a bulk edit and have the correct descriptions applied to the proper VM's.
    Below is my sytax for editing a single VM.
    Set-SCVirtualMachine %VMname% -Description 'Test Description'
    Can anyone assist?

    Thank you,
    Much appreciated!  
    • Edited by MStechGy Wednesday, August 2, 2017 10:42 PM
    Wednesday, August 2, 2017 10:35 PM


  • You should urgently learn the basics of Powershell.

    Export:  (Don't use a format cmdlet if you want to export some data)

    Get-SCVirtualMachine | Select-Object -Property Name, Description | Export-CSV C:\temp\VMdescriptions.csv
    Import and use after edit:
    Import-CSV C:\temp\VMdescriptions.csv | ForEach-Object {
        Set-SCVirtualMachine $_.Name -Description $_.Description

    Grüße - Best regards

    PS:> (79,108,97,102|%{[char]$_})-join''

    • Marked as answer by MStechGy Wednesday, August 2, 2017 11:55 PM
    Wednesday, August 2, 2017 10:56 PM