We help IT Professionals succeed at work.
Get Started

run powershell code to run EDID info from win xp

Last Modified: 2012-06-18
I`m newbie in powershell world.
I have a code written in powershell.
i`d like to run it in windows xp to get EDID info .
may a help how to do it.
when i run it as powershell pathtothefile.ps1
it gives me error.
when i run it through PowerGUI , it doesn`t return info.
(inside the code there is functions ,which i don`t know hot to output.etc)
link to the code:
Function Get-MonitorInfo 









        [string]$name = '.' 






        $ActiveMonitors = Get-WmiObject -Namespace rootwmi -Class wmiMonitorID -ComputerName $name 

        $monitorInfo = @()  


        foreach ($monitor in $ActiveMonitors)  


            $mon = New-Object PSObject  

            $manufacturer = $null 

            $product = $null 

            $serial = $null 

            $name = $null 

            $week = $null 

            $year = $null 


            $monitor.ManufacturerName | foreach {$manufacturer += [char]$_}  

            $monitor.ProductCodeID | foreach {$product += [char]$_}  

            $monitor.SerialNumberID | foreach {$serial += [char]$_}  

            $monitor.UserFriendlyName | foreach {$name += [char]$_}  


            $mon | Add-Member NoteProperty Manufacturer $manufacturer 

            $mon | Add-Member NoteProperty ProductCode $product 

            $mon | Add-Member NoteProperty SerialNumber $serial 

            $mon | Add-Member NoteProperty Name $name 

            $mon | Add-Member NoteProperty Week $monitor.WeekOfManufacture  

            $mon | Add-Member NoteProperty Year $monitor.YearOfManufacture  


            $monitorInfo += $mon 





Open in new window

Watch Question
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE