Query server from test file

Welcome Forums General PowerShell Q&A Query server from test file

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
2 years, 2 months ago.

  • Author
    Posts
  • #65187

    Participant
    Topics: 40
    Replies: 41
    Points: 11
    Rank: Member

    Hi,
    I am able to get the details for VM's from ESX host using the below script:
    Get-VM | `
    ForEach-Object {
    $Report = "" | Select-Object -property Name,NumCpu,MemoryMB,Host,IPAddress
    $Report.Name = $_.Name
    $Report.NumCpu = $_.NumCpu
    $Report.MemoryMB = $_.MemoryMB
    $Report.Host = $_.Host
    $Report.IPAddress = $_.Guest.IPAddress
    Write-Output $Report
    } | Export-Csv "C:\VM.csv"

    I am not able to pull servers from a text file & query the above script.

    -Kalyan

  • #65196

    Participant
    Topics: 1
    Replies: 1267
    Points: 1,395
    Helping Hand
    Rank: Community Hero

    I am not able to pull servers from a text file & query the above script.

    Why not? What's the problem?

The topic ‘Query server from test file’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort