winlin
Goto Top

Get-WSUSServer Authorization Error

Hallo Leute,

ich habe einen WSUS Server welcher nicht AD gejoint ist eingerichtet. Wenn ich nun von einem System welches im gleichen Netz liegt in der Powershell den Befehl absetze :
Get-WsusServer -Name WSUS.DOMAIN.COM -PortNumber 8530

erhalte ich diesen Fehler:
Get-WsusServer : The request failed with HTTP status 401: Unauthorized

Könnt ihr mir sagen was das Problem verursacht????
UAC ist aus
FW ist aus
PING funktioniert

Content-Key: 307483

Url: https://administrator.de/contentid/307483

Printed on: April 18, 2024 at 13:04 o'clock

Mitglied: 129813
129813 Jun 17, 2016 updated at 13:16:42 (UTC)
Goto Top
Hi.
Sorry, my german writing isn't as good as my understanding so i'm writing in English.

You have to authorize yourself to the WSUS Server, because the server you are trying to access isn't in your domain you have to provide credentials wich have enough rights on the WSUS with the cmdlet by using the -Credentials Attribute, or by storing the credentials in your wallet for the target system. Otherwise the powershell console uses the credentials of the current user, which has no rights on the WSUS!
So, this is absolutely normal behavior, if you do not authorize yourself to the remote system, correctly.

Regards
Member: DerWoWusste
DerWoWusste Jun 17, 2016 at 17:41:46 (UTC)
Goto Top
Hi.

Was Du da machst, ist Dir klar? Du fragst den WSUS, welchen WSUS er selbst denn nutzt... für diese Frage musst Du Dich authentifizieren.
Member: winlin
winlin Jun 20, 2016 at 07:43:38 (UTC)
Goto Top
Hi,

danke fur's Feedback. Wie bereits gesagt ist der WSUS nicht AD gejoint. Von einer anderen Maschine versuche ich über die CMD oder auch über die WSUS Gui mich mit dem Server zu verbinden - Fehler!

Ich habe versucht die WSUS Gui auf der Testmaschine mit den Credentials (lokaler Admin) zu öffnen - das klappte Gui war da - doch beim connect to server erhielt ich den Fehler The remote server could not be contacted - verify that IIS is correctly configured and is running.?!?!?!?!?!
Member: DerWoWusste
DerWoWusste Jun 20, 2016 at 07:49:43 (UTC)
Goto Top
Was willst Du denn abfragen?
Mitglied: 129813
129813 Jun 20, 2016 updated at 07:56:35 (UTC)
Goto Top
If you are running a server outside a domain an want to access it via Powershell you have to configure WSMAN and the Trusted Hosts which the Server trusts, otherwise you won't be able to connect.
See
https://4sysops.com/archives/enable-powershell-remoting-on-a-standalone- ...
Member: winlin
winlin Jun 20, 2016 at 09:53:03 (UTC)
Goto Top
Ok i will checkout wsman...i think that i should cremte a certificate too and store IT on that machine from Where i want To connect right????
Mitglied: 129813
129813 Jun 20, 2016 updated at 11:45:10 (UTC)
Goto Top
Zitat von @winlin:
Ok i will checkout wsman...i think that i should cremte a certificate too and store IT on that machine from Where i want To connect right????
That's not required... only if you want to use an https listener.
https://blogs.technet.microsoft.com/heyscriptingguy/2013/11/29/remoting- ...

p.s. your question mark key is damaged ...
Member: winlin
winlin Jun 20, 2016 at 12:55:27 (UTC)
Goto Top
everything configured like shown on the site - even the trusted hosts are shown in my list - but if i want to connect:
PS C:\Windows\system32> Enter-PSSession -ComputerName 10.26.40.3 -Credential $Credentials
Enter-PSSession : Connecting to remote server 172.16.96.3 failed with the following error message : The WinRM client
cannot process the request. Default authentication may be used with an IP address under the following conditions: the
transport is HTTPS or the destination is in the TrustedHosts list, and explicit credentials are provided. Use
winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated. For more
information on how to set TrustedHosts run the following command: winrm help config. For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -ComputerName 172.16.96.3 -Credential $Credentials
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (172.16.96.3:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

i followed all the steps and rebootet the machine.

Get-Item WSMan:\localhost\Client\TrustedHosts
PS C:\Windows\system32> Get-Item WSMan:\localhost\Client\TrustedHosts


   WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Client

Type            Name                           SourceOfValue   Value
----            ----                           -------------   -----
System.String   TrustedHosts                                   172.16.96.3
Mitglied: 129813
129813 Jun 20, 2016 updated at 17:00:27 (UTC)
Goto Top
I dont see you are defining the credentials object?

I suppose you totally forgott to configure the WSUS Server for Remoting!!

You should have also read the links inside the above site. You need to understand the concept before you do anything else ....

Also you should set the following registry entry on the WSUS Server to get around UAC issues if you are using UAC on the WSUS Server
https://www.windowspro.de/tipp/uac-filter-fuer-windows-fernwartung-absch ...