Automate file conversion process using PowerShell

15 pts.
Tags:
Powershell
I want to force PowerShell to run a command on a different server during an automated process run on a schedule. It runs when I type the commands manually, but fails when I try to run it from the .ps1 file. Guidance would be great. Thanks.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • danieljones
    Check out the following link hope this will help you: https://msdn.microsoft.com/en-us/library/dn414687(v=nav.90).aspx
    2,840 pointsBadges:
    report
  • mwo692
    Thanks
    15 pointsBadges:
    report
  • Richard Siddaway
    Running a command on a different server is known as remoting. If the cmdlet you're using has a ComputerName parameter it means you can run it against a remote machine. In this case the cmdlets are usually using RPC/DCOM to access the remote machine which is often blocked. 

    if you use Invoke-Command to run the command against the remote machine you need to have PowerShell remoting enabled on the remote machine.

    Are you running the script with the same credentials as when you run it manually?

    Does your command running on the remote machine fail because you are accessing a third machine? This is a well known issue with a work around.

    Can you share the command that fails in the script?
9,440 pointsBadges:
report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: