invoke-command from Cent OS 7.4 to Windows 2012 R2 Access Denied

PS /tmp> invoke-command -Computername tgcs010 {get-process} -credential administrator

PowerShell credential request
 Enter your credentials.
 Password for user administrator: ********

invoke-command : MI_RESULT_ACCESS_DENIED
 At line:1 char:1
•invoke-command -Computername tgcs010 {get-process} -credential admini ...

•CategoryInfo : InvalidOperation: (:) [Invoke-Command], PSInvalidOperationException
•FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.InvokeCommandCommand

PS /tmp>

MY Version running on CENT OS 7.4

PS /tmp> $PSVersionTable

Name Value

PSVersion 6.0.0-rc.2
 PSEdition Core
 GitCommitId v6.0.0-rc.2
 OS Linux 3.10.0-693.11.1.el7.x86_64 #1 SMP Mon D...
 Platform Unix
 PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
 PSRemotingProtocolVersion 2.3
 WSManStackVersion 3.0

On my Windows 10 computer same command works

I domain joined the Cent OS server to my Windows Domain also.

What am I missing?

Thank you
LVL 23
Thomas GrassiSystems AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jose Gabriel Ortega CastroCEOCommented:
You are using "administrator" that should be "domain\administrator":
invoke-command -Computername tgcs010 {get-process} -credential "domain\administrator"

Open in new window

try again with your domain credentials.
Thomas GrassiSystems AdministratorAuthor Commented:
Same results

PS /root> Invoke-command -computername tgcs011 {get-process} -Credential "our\administrator"

PowerShell credential request
Enter your credentials.
Password for user our\administrator: ********

At line:1 char:1
+ Invoke-command -computername tgcs011 {get-process} -Credential "our\a ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (:) [Invoke-Command], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.InvokeCommandCommand

Jose Gabriel Ortega CastroCEOCommented:
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Thomas GrassiSystems AdministratorAuthor Commented:

Powershell remoting in on in all my Windows servers

From my Windows 10 computer I can invoke-command and enter-possession to any server in any domain.

Just not from the Cent OS machine.

How do I enable psremoting on Cent OS?

 Been on GritHub site could not find anything there either.


PS /root> enable-psremoting
enable-psremoting : The term 'enable-psremoting' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ enable-psremoting
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (enable-psremoting:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

Any ideas?
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Remoting needs to be enabled on the target systems only, so you should be fine without on CentOS (for this purpose).

The whole topic of PS Remoting is still fresh and only partially implemented, AFAIK. According to, you cannot use Kerberos, which is the default for domain-joined machines, but have to provide Basic or NTLM authentication instead, by just adding -Authentication Basic or -Authentication Negotiate.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jose Gabriel Ortega CastroCEOCommented:
So in resumen:

Invoke-command -computername tgcs011 {get-process} -Credential "our\administrator"  -Authentication Basic (-Authentication Negotiate.)

Open in new window

(I didn't know about the psremoting on unix). Either way, as Qlemo said it's only in the "Target" OS not in the source one.
Thomas GrassiSystems AdministratorAuthor Commented:
According to GitHub you need to use openssh on windows servers

sub -computername with -hostname

does any one have this working?

I can now ssh from my Cent OS 7.4 server to my Windows 2012 R2 server

but the invoke-command and enter-possession still do not work
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
SSH is another way to remote connect, not the only one.
Thomas GrassiSystems AdministratorAuthor Commented:
Having it working using ssh but that is not the method I need
Waiting for MS to fix this
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.