We are in day 1 of a PowerShell class here in Phoenix. I’ve been keeping an eye on PowerShell.com and PowerShell.org to try and find questions that we can help with. Right before we started our topic on saving and retrieving objects from disk, an IT pro asked a question concerning getting and processing information about their virtual machines. Get-VM | Out-File C:\ps\VMS.txt $VMs = Get-Content -Path C:\PS\VMS.txt ForEach ( $VM in $VMs ) { $VM | Select-Object -Property Name Get-VM $VM | Get-DatastoreCluster } Do you see the problem here? The IT Pro is correctly getting his virtual machine objects. The problem is he is saving them to a text file. Let’s look at the text file. PS C:\> Get-Content -Path C:\ps\VMS.txt Name State CPUUsage(%) MemoryAssigned(M) Uptime Status ...
Welcome to the blogsite of MCTExpert. I am a Microsoft Certified Trainer. Here you will find the real questions that are asked to me by my students.