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-ID: 307483

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

Ausgedruckt am: 24.11.2024 um 10:11 Uhr

129813
129813 17.06.2016 aktualisiert um 15:16:42 Uhr
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
DerWoWusste
DerWoWusste 17.06.2016 um 19:41:46 Uhr
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.
winlin
winlin 20.06.2016 um 09:43:38 Uhr
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.?!?!?!?!?!
DerWoWusste
DerWoWusste 20.06.2016 um 09:49:43 Uhr
Goto Top
Was willst Du denn abfragen?
129813
129813 20.06.2016 aktualisiert um 09:56:35 Uhr
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- ...
winlin
winlin 20.06.2016 um 11:53:03 Uhr
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????
129813
129813 20.06.2016 aktualisiert um 13:45:10 Uhr
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 ...
winlin
winlin 20.06.2016 um 14:55:27 Uhr
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
129813
129813 20.06.2016 aktualisiert um 19:00:27 Uhr
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 ...