Welcome,
Guest.
Please
Login
or
Register
.
News:
Home
Help
Search
Calendar
Register
Login
Vmware Scripting Forum
»
Scripts!
»
Powershell Scripts
»
Guest Scripts
»
List Poweredon VMs
Pages: [
1
]
« previous
next »
Print
Author
Topic: List Poweredon VMs (Read 1280 times)
dma0211
Newbie
Posts: 15
List Poweredon VMs
«
on:
January 14, 2009, 07:38:13 AM »
Code:
$report = @()
$AllVM = Get-VM
foreach ($VM in $AllVM){
if ($vm.PowerState -eq "PoweredOn") {
$row = "" | add-member VMName
$row.VMName = $VM.Name
$report += $row
}
}
$report | Export-Csv "C:\report.csv" -noTypeInformation
«
Last Edit: January 14, 2009, 07:49:38 AM by esarakaitis
»
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Discussion
-----------------------------
=> Suggestion Area
-----------------------------
VMware Scripting!
-----------------------------
=> General Discussion
=> VMware Scripting Links
-----------------------------
Scripts!
-----------------------------
=> Powershell Scripts
===> Guest Scripts
===> Host Scripts
===> Networking Scripts
===> Reporting Scripts
===> Cluster Scripts
===> Datastore/Disk Scripts
=> Orchestrator Workflow's
=> .NET (C#/VB.NET)
=> RCLI
=> Bash Scripts
=> Perl Scripts
=> Vprobes
=> Python
-----------------------------
Scripting Language Resources
-----------------------------
=> Bash
=> PowerShell
=> Python
=> Perl
Loading...