Skip to content

Update Readme, Include support for new function Get-AllVMSnapshot#9

Open
nshores wants to merge 2 commits into
dapacruz:masterfrom
nshores:master
Open

Update Readme, Include support for new function Get-AllVMSnapshot#9
nshores wants to merge 2 commits into
dapacruz:masterfrom
nshores:master

Conversation

@nshores

@nshores nshores commented Apr 23, 2018

Copy link
Copy Markdown

I've created a new function that will check for all VM snapshots, hidden or not, and report on them. Take a look at and let me know if any changes are needed. I tried to follow the existing standards code wise in the rest of the functions.

@dapacruz dapacruz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix these minor issues.

Comment thread README.md
**Get-VMCpuReadyPercent**
Calculates the CPU ready percent average of virtual machines provided

**Get-VMCpuReadyPercent**

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated from line 43 and 44.

Comment thread README.md
**Get-VMCpuReadyPercent**
Calculates the CPU ready percent average of virtual machines provided

**Get-AllVMsnapshot**

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename the function to Get-SnapshotAll. This helps with sorting, the included command is Get-Snapshot.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking Get-SnapshotHidden might be better.

$snapshotfinal = @()
$vmlist = get-vm $VM

#Get a list of all VM's with known snapshots

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments should have a space after #.

}
}

#Get all VM's with delta disks

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix function indentation.

$icount = $final.count - $snapshotfinal.count
Write-Output "Total number of VM's with visible snapshots: $vcount"
write-output "Total number of VM's invisible snapshots: $icount"
write-output "`nYou have hidden snapshots on the follow VM's:`n"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only print if a hidden snapshot is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants