I want to create a COM object, internet explorer application. The following code works fine in PowerShell ISE (32 bit):
$ie = New-Object -com InternetExplorer.Application
But, when I try running it on Jenkins Windows server (using either the powershell plugin or calling the PS1 with a batch file), I get the following error.
Building on master in workspace C:\Program Files\Jenkins\workspace\Jenkins Test [Jenkins Test] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\WINDOWS\TEMP\hudson3148932824880446098.ps1'" New-Object : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 80004005. At C:\WINDOWS\TEMP\hudson3148932824880446098.ps1:1 char:17 + $ie = New-Object <<<< -com InternetExplorer.Application + CategoryInfo : ResourceUnavailable: (:) [New-Object], COMException + FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand
I'm using a VM at work (Server 2003). I'm not sure if this is an issue with my server permissions or if these are interactive commands being used with a non-interactive device. Can anyone help?