Unable to connect to Remote powershell - powershell

Im trying to connect to remote powershell,I have tried to authenticate it using Kerberos and negotiate both ended up the same error
A specified authentication package is unknown. For more information, see the about_Remote_Troubleshooting Help topic.|
This is the error message that im receiving,I need the soltution to fix it.

Try this:
Start PowerShell with the Run as administrator option
Run the following command: Start-Service WinRM
Re-run the command that generated the error:
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_troubleshooting?view=powershell-7.3

Related

How can I help Powershell to find the remote server?

Using the Enter-PSSession cmdlet, I get an error that the server is not found. However, I can immediately ping the same server, so I wondering what the error really is and how to fix it. e.g.
Note: I can use RDP to connect to this server and normally do that. However, if I could use PowerShell remote sessions my work would be easier and faster.
Tried again with an ip-based connection (using the ip from the ping, above) and an explicit credential. Failed with a new error:

winexe error: Cannot connect to svcctl pipe. NT_STATUS_ACCESS_DENIED

Am trying to execute the following winexe command, but it throws 'ERROR: Cannot connect to svcctl pipe. NT_STATUS_ACCESS_DENIED.'
winexe -U domain/username%password //windows_machine ipconfig
debug info shows,
ERROR: smb_raw_open_recv - NT_STATUS_ACCESS_DENIED
ERROR: on_ctrl_pipe_error - NT_STATUS_ACCESS_DENIED
ERROR: Cannot open control pipe - NT_STATUS_ACCESS_DENIED
When i have 'winexesvc.exe' in Windows machine, the command works.
My understanding according to http://opensourceinfo.blogspot.com/ is that winexe itself creates winexesvc service, starts it and tries to connect to control pipe. If that's the case, what setting should i have in Windows to resolve Access Denied error and get the service installed successfully? Please correct me if am wrong.
I also came across similar issue in https://sourceforge.net/p/winexe/bugs/35/ post, but am unable to understand the given resolution 'I was trying to log on via a domain user, but only local users were configured'
Note that I have already set,
1. Network Access: Sharing and security model for
local accounts" to "Classic – local users authenticate as themselves
2. LocalAccountTokenFilterPolicy to 1.
So do we need to manually place winexesvc.exe in Windows machine for winexe to work or can we fix the above Access Denied error?
Thanks in advance.

Error: VS30063: You are not authorized to access

We are trying to install and configure the agent on RedHat.
1. I can able to unzip and install agent on Red Hat
2. While running ./Config.sh, I choose negotiate authentication and provided username in the format of Domain\user then password
3. Now am getting error, Error: VS30063: You are not authorized to access
FYI, we are using TFS 2015.3 version, I have administrator access on server level and also I can connect to TFS by using same loginsthrough IE/chrome.
Could please help me to resolve the above error
Thanks in advance
Add user here to get Agent Pool Administrator Permission

Execute remote PowerShell script from VSOnline fails - Access Denied

I am facing a very strange issue trying to run a Remote PowerShell script from the new build system of Visual Studio Online.
Context:
I have a Build server that I host on my own VM. I have also created a second VM where I want the PowerShell script to be run on.
When I run a build from the Build server, I want to create a task that run a PowerShell script on a remote machine. Sounds easy.
Both machines have everything configured to run the Remote PowerShell. (I think)
Problem:
If I manually run the script from the build server, the script is properly executed on my remote machine.
But, if I run the script by starting a new build, it doesn't work, I always get an error message
New-PSSession : [xxx.cloudapp.net] Connecting to remote server xxx.cloudapp.net failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.
Have you faced this issue before with VSOnline?
This can happen if there isn't a trust relationship between the remote machine and the build machine. E.g. you could look at the hosts.equiv file on the remote machine and make sure it trusts the build machine.
If that doesn't help then more info might be needed, like how you're trying to sign in, what build agent account you're running as.
Guy

Getting error while trying to invoke a powershell command on a remote machine

machineName have tried executing a script using invoke-command in the following way:
Invoke-command -filepath C:\scripts\GettMembers.ps1 -computername "machinename" -credential $Getcredential
But I am getting the following error :
Connecting to remote server failed with the following error message : The WinRM client cannot process the request because the server name cannot be resolved. For more information, see the about_Remote_Troubleshooting Help topic.
But I was able to add the machine to the trusted hosts of the local machine using the following command :
winrm set winrm/config/client `#{TrustedHosts="machineName"}'
The problem appears to be that "machinename" isn't something your DNS knows how to resolve. This isn't a powershell problem, but rather a system configuration problem.
You can verify this by asking powershell to resolve the machine name with something like this:
$machine = "machinename"
[System.Net.Dns]::GetHostEntry($machine)
If you get an error, that means that you're using a machine name that can't be resolved (ie: windows can't convert "machinename" to an IP address). It's not a matter of trust or permissions, it's that your computer doesn't think "machinename" is a valid machine on your network.
Have you tried using a fully qualified address (eg: machinename.mycompany.com)?
I was getting this error on two servers that were configured for DNS and could ping the target. The resolution was this command:
netsh winhttp reset proxy
Credit to the following blog:
http://directaccessguide.com/2014/03/05/winrm-client-errors-in-remote-access-console/
Just installed Exchange 2016 en had the "The WinRM client cannot process the request because the server name cannot be resolved" problem. Removed winhttp proxy setting and BAM!