20 Dec 2011 @ 7:34 AM 

An ISO is mounted when you install the Hyper-V Integration Tools … but not unmounted when the installation is finished. So whenever I go to a customer for migrations or maintenance on a Hyper-V (SCVMM) environment, I always dismount those ISO’s.

Doing this manually takes a lot of time and is a task that kinda sucks… So, let’s use my favorite tool for that: PowerShell.

The following script will dismount all ISO images:

Get-VirtualDVDDrive -VMMServer $VMMServer -All | Where-object {($_.ISO -ne $null) -and ($_.ISOLinked -eq $false)} | Set-VirtualDVDDrive –NoMedia

But what if you would only like to dismount the Hyper-V Integration Tools ISO and leave the rest intact?

Get-VirtualDVDDrive -VMMServer $VMMServer -All | Where-object {($_.ISO -ne $null) -and ($_.ISOLinked -eq $false) -and ($_.ISO -like ‘vmguest’)} | Set-VirtualDVDDrive -NoMedia

Post to Twitter

Posted By: Jeff Wouters
Last Edit: 20 Dec 2011 @ 07:34 AM

EmailPermalinkComments (2)
Tags
Categories: Hyper-V, PowerShell, SCCM
 22 Nov 2011 @ 1:38 PM 

A few minutes ago I came across this post: PowerShell Script: SCCM Health Check

Which got me thinking… what about writing a simple function to repair a SCCM client which you can provide your service desk or local support employees just in case you don’t want to provide them access to a SCCM Management Console.

Well, here is it:

# Usage: SCCM-RepairClient <TargetName>
function SCCM-RepairClient([String] $strTargetName)
{
$SCCMClient = [wmiclass] "\\$strTargetName\root\ccm:sms_client"
$SCCMClient.RepairClient()
}

Post to Twitter

Posted By: Jeff Wouters
Last Edit: 22 Nov 2011 @ 01:38 PM

EmailPermalinkComments (1)
Tags
Categories: Microsoft, PowerShell, SCCM, Script

 Last 50 Posts
 Back
Change Theme...
  • Users » 1
  • Posts/Pages » 250
  • Comments » 429
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About



    No Child Pages.

Contact



    No Child Pages.