invoke-command vs. enter-pssession

When I use invoke-command to start a Dell bios config .exe on a remote machine the exe starts but does not complete the job until I log onto the computer with an Admin acct. If I enter-pssession and start the same exe it completes thoroughly. Any ideas?

im guessing it will be using local non admin creds to run the invoke command

try this

$Username = "Domain\Username
	$Password = ConvertTo-SecureString "Passwordgoeshere" -AsPlainText -Force
	$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password

Invoke-Command -Credential $creds {

Do Stuff here 

}

It will be running as local machine user rather than with your admin creds

$Username = “domain\username”
$Password = ConvertTo-SecureString “password goes here” -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password

invoke-command -credential $cred {

Do Stuff Here

}

It is likely failing because the installer requires an active profile to run the executable, which is not what you get when you run Invoke-Command. It’s a poorly made installer, in other words; unless you can repackage it somehow, there’s not really a workaround.

Thank you so much for the insight Don.

If you’re on Windows 8/2012 or later, you could create a temporary scheduled task to run the bios config command. As alternative if you’re configuring a desktop or laptop you could try to use the Dell BIOS PowerShell module which you can download from their homepage.