Microsoft Virtualization Discussions

Send in the Clone(s)

BISHTECHIT
3,723 Views

Hello Script Community -

I am trying to get help with a script -

I am able to produce a report listing existing clones, but am not clear how the

  • Stop-NaClone
  • Clear-NaClone

Will allow me to remove it.

Please provide any assistance or sample scripts if you are able.

Thanks,

peter

2 REPLIES 2

JOHNGARRETT
3,723 Views

Peter,

Better late than never, right? Those cmdlets relate to lun clone operations in progress or failed lun clone operations. Is that what you're after, or are you trying to find volume clones?

If you're after vol clones, you could adapt this to your script:

$volstats = get-NaVol

foreach ($vol in $volstats) {

     if ($vol.CloneChildren -ne $null) {

     write-Host "Volumes with clones:"

     write-Host $vol.CloneChildren

     }

}

I hope that helps.

BISHTECHIT
3,723 Views

Thanks John -

To late never a helpful hand received is [Yoda]

Your script was helpful in allowing me to report on clones attached to Volumes.

Ultimately - after more reading and research - what I need is a better understanding of the clone process.

Which should allow me to know what cmdlets to use to report on the existence of a clone, the status of that clone, and when it is safe to remove that clone if it is not being removed properly by a backup process.

Public