Copy some files to a remote window servers with password less and execute on remote locally

Hi,
In a Microsoft Windows environment, would like to achieve below.  Please suggest.

1.      Would like to copy some files to a remote window servers with password less (wihout password prompt). We can input pwd to a script.
2.      Executing file remote (start.exe), which should run locally on the remote server.
3.      Get the completion status back to master server. which pushed the file

Please also advise on the utility that I might need to achieve this (e.g bat, vbscript, powersheel etc)

I’m familiar in linux environment but not in Windows
enthuguyAsked:
Who is Participating?
 
DavidPresidentCommented:
This link from the MSFT windows script center has all you need to do this, plus some excellent examples.
https://technet.microsoft.com/en-us/library/dd819505.aspx?f=255&MSPPError=-2147217396

Invoke-Command [[-ComputerName] <string[]>] [-ScriptBlock] <scriptblock> [-ApplicationName <string>] [-ArgumentList <Object[]>] [-AsJob] [-Authentication {<Default> | <Basic> | <Negotiate> | <NegotiateWithImplicitCredential> | <Credssp> | <Digest> | <Kerberos>}] [-CertificateThumbprint <string>] [-ConfigurationName <string>] [-Credential <PSCredential>] [-HideComputerName] [-InputObject <psobject>] [-JobName <string>] [-Port <int>] [-SessionOption <PSSessionOption>] [-ThrottleLimit <int>] [-UseSSL] [<CommonParameters>]

Invoke-Command [[-ComputerName] <string[]>] [-FilePath] <string> [-ApplicationName <string>] [-ArgumentList <Object[]>] [-AsJob] [-Authentication {<Default> | <Basic> | <Negotiate> | <NegotiateWithImplicitCredential> | <Credssp> | <Digest> | <Kerberos>}] [-ConfigurationName <string>] [-Credential <PSCredential>] [-HideComputerName] [-InputObject <psobject>] [-JobName <string>] [-Port <int>] [-SessionOption <PSSessionOption>] [-ThrottleLimit <int>] [-UseSSL] [<CommonParameters>]

Invoke-Command [[-Session] <PSSession[]>] [-FilePath] <string> [-ArgumentList <Object[]>] [-AsJob] [-HideComputerName] [-InputObject <psobject>] [-JobName <string>] [-ThrottleLimit <int>] [<CommonParameters>]

Invoke-Command [[-ConnectionURI] <Uri[]>] [-FilePath] <string> [-AllowRedirection] [-ArgumentList <Object[]>] [-AsJob] [-Authentication {<Default> | <Basic> | <Negotiate> | <NegotiateWithImplicitCredential> | <Credssp> | <Digest> | <Kerberos>}] [-ConfigurationName <string>] [-Credential <PSCredential>] [-HideComputerName] [-InputObject <psobject>] [-JobName <string>] [-SessionOption <PSSessionOption>] [-ThrottleLimit <int>] [<CommonParameters>]

Invoke-Command [-ScriptBlock] <scriptblock> [-ArgumentList <Object[]>] [-InputObject <psobject>] [<CommonParameters>]

Invoke-Command [[-Session] <PSSession[]>] [-ScriptBlock] <scriptblock> [-ArgumentList <Object[]>] [-AsJob] [-HideComputerName] [-InputObject <psobject>] [-JobName <string>] [-ThrottleLimit <int>] [<CommonParameters>]

Invoke-Command [[-ConnectionURI] <Uri[]>] [-ScriptBlock] <scriptblock> [-AllowRedirection] [-ArgumentList <Object[]>] [-AsJob] [-Authentication {<Default> | <Basic> | <Negotiate> | <NegotiateWithImplicitCredential> | <Credssp> | <Digest> | <Kerberos>}] [-CertificateThumbprint <string>] [-ConfigurationName <string>] [-Credential <PSCredential>] [-HideComputerName] [-InputObject <psobject>] [-JobName <string>] [-SessionOption <PSSessionOption>] [-ThrottleLimit <int>] [<CommonParameters>]

Open in new window

0
 
CoralonCommented:
You can also use psexec.exe from SysInternals - http://www.microsoft.com/sysinternals.  It includes an option to copy the file that needs to be executed to the remote system.

PSExec requires that the admin shares be visible and available, and Powershell (mentioned above) requires that the remote system already be configured to allow remoting.  

Coralon
0
 
enthuguyAuthor Commented:
Thanks dlethe, Looks like powershell is the way to go (or atleast will meet my requirement)

Went thru some Microsoft virtual academy training as well. its really cool
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.