Sunday, March 6, 2016

VMware PowerCLI find vmsn, ctk and delta files across LUN

$dstore=Get-Datastore
clear
foreach($dss in $dstore)
{
write-host $dss.Name


$vm=Get-ChildItem -Path vmstore:\"UK Datacenter"\$dss |select name

    foreach($fol in $vm)
    {
    write-host $fol.Name
    $file=$fol.Name



    Get-ChildItem  -Path vmstore:\"UK Datacenter"\$dss\$file|Select-String -Pattern "vmsn"
    Get-ChildItem  -Path vmstore:\"UK Datacenter"\$dss\$file|Select-String -Pattern "delta"
    Get-ChildItem  -Path vmstore:\"UK Datacenter"\$dss\$file|Select-String -Pattern "ctk"

    }
}

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...