In System Center Virtual Machine Manager there is a library. The library stores resources used in the environment and one kind of resources is ISO images. The problem is that names on those ISO images is slightly “technical” and not so user-friendly. So who cares?
The Issue:
When you start using Windows Azure Pack to provide self-service, that is a very good reason to have nice names here is two samples
In the first picture, all the names looks ok, in the second picture, it looks different…
The names of the these files comes from System Center Virtual Machine Manager and they are easy to change, just go in to the library, open each and everyone and change the name…
How to modify the name of the ISO resource in the SCVMMLibrary using the UI.
However, doing that for one or two files are ok, more then that, it kind of gets boring after a while.
The Solution:
So, you can export all the information in to a CSV file, modify the CSV file to suit your organization and then import it again.
Export CD/DVD meta data from SCVMM using PowerShell
Get-SCISO -All -VMMServer “clscvm01.cloud.truesec.com” | where HostType -EQ LibraryServer | Select LibraryServer,SharePath,Name,Description | ConvertTo-Csv -NoTypeInformation > “$env:TEMPISOInSCVMMLib.csv”
and that will give something like this:
A few of the ISO’s in the SCVMMLibrary.
So, open the file, modify name and description and run this
function Update-ISOForSCVMLib
{
[CmdletBinding()]
Param
(
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
$LibraryServer,
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=1)]
$SharePath,
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=2)]
$Name,
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=3)]
$Description
)
$ISOToUpdate = Get-SCISO -All | Where LibraryServer -EQ $LibraryServer | Where SharePath -EQ $SharePath
$ISOToUpdate | Set-SCISO -Description $Description -Name $Name
}
This will give you a new function and that new function can be used in the following way.
Import-Csv .\ISOInSCVMMLib.csv | foreach {Update-ISOForSCVMLib $_.LibraryServer -SharePath $_.SharePath -Name $_.Name -Description $_.Description}
The function is going trough the CSV file and search for the file, find the object and finally change the display name of the object.
/mike
Categories: SCVMM, System Center 2012 R2, Virtual Machine Manager