Skip to content

Commit

Permalink
Added Get-VIAActiveDiffDisk
Browse files Browse the repository at this point in the history
  • Loading branch information
DeploymentBunny committed Nov 7, 2016
1 parent 2e993f4 commit 2e77903
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Tools/Get-VIAActiveDiffDisk/GetVIAActiveDiffDisk.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Function Get-VIAActiveDiffDisk{
<#
.Synopsis
Script used to Deploy and Configure Fabric
.DESCRIPTION
Created: 2016-11-07
Version: 1.0
Author : Mikael Nystrom
Twitter: @mikael_nystrom
Blog : http://deploymentbunny.com
Disclaimer: This script is provided "AS IS" with no warranties.
.EXAMPLE
Get-VIAActiveDiffDisk
#>
[CmdletBinding(SupportsShouldProcess=$true)]
param(
)

$VMHardDiskDrives = Get-VMHardDiskDrive -VM (Get-VM)
$ActiveDisks = foreach($VMHardDiskDrive in $VMHardDiskDrives){
$Diffs = Get-VHD -Path $VMHardDiskDrive.Path | Where-Object -Property VhdType -EQ -Value Differencing
$Diffs.ParentPath
}
$ActiveDisks | Sort-Object | Select-Object -Unique
}

0 comments on commit 2e77903

Please sign in to comment.