This shows you the differences between two versions of the page.
| vmware_powercli [2023/06/29 15:06] – created david | vmware_powercli [2023/06/29 15:09] (current) – PowerCLI Code Snippits david | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Find subnet a VM is in using VMware Tools: | + | ===Find subnet a VM is in using VMware Tools:=== |
| <code powershell> | <code powershell> | ||
| Line 16: | Line 16: | ||
| [String]:: | [String]:: | ||
| }} | }} | ||
| + | </ | ||
| + | |||
| + | ===Get a csv file listing all VMs and their tags=== | ||
| + | <code powershell> | ||
| + | Get-VM | | ||
| + | Select-object Name, | ||
| + | |||
| + | @{N = ' | ||
| + | |||
| + | @{N = ' | ||
| + | |||
| + | | ||
| + | |||
| + | | ||
| + | |||
| + | Export-Csv -path “c: | ||
| </ | </ | ||