davesnb
asked on
new-object -comobject
Hello EE,
I had a script runing under 2003 server and powershell using the below com object , however when i run the getstatistics nothing comes back , the object is registered and the Egilh.ComTracker shows in the com object list . Is there a way to get this working under the 2012 64bit whcih I am running now?
I had a script runing under 2003 server and powershell using the below com object , however when i run the getstatistics nothing comes back , the object is registered and the Egilh.ComTracker shows in the com object list . Is there a way to get this working under the 2012 64bit whcih I am running now?
$tracker = new-object -comobject Egilh.ComTracker
$trackerlist = [xml]($tracker.getstatistics())
Get-ChildItem HKLM:\Software\Classes -ErrorAction SilentlyContinue | Where-Object {
$_.PSChildName -match '^\w+\.\w+$' -and (Test-Path -Path "$($_.PSPath)\CLSID")
} | Select-Object -ExpandProperty PSChildName
ASKER
No, that was my first line of code . Blank result
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK It works when I run the 32 bit powershell version . However, in my case I have a script that runs on a powershell ssh session , so I need to force the script to run as 32bit . Is there a way to include something at the beginning of the script to run using 32bit powershell?
How do you connect exactly? When creating a remote PS session via WinRM you can provide a session configuration created for that purpose of making sure you run on 32bit.
ASKER
I connect using "powershell server " it runs as a service . So when I connect , it connects to the native shell, which in this case is 64 bit .
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window