gaten
gaten

Reputation: 31

Authentication failed using Windows Credentials on ServiceNow

I'm trying to find a host on ServiceNow, and we know that this uses WMI to do the discovery. I get the following problem in the discovery phase:

User credentials can not be used for local connections

I tried to execute the command directly from MID Server (192.168.1.186):

Get-WmiObject -Class Win32_OperatingSystem -Namespace root / cimv2 -ComputerName 192.168.1.196 -Credential WORKGROUP \ administrator

but I get the following error:

Get-WmiObject: User credentials can not be used for local connections
At line: 1 char: 1
+ Get-WmiObject -Class Win32_OperatingSystem -Namespace root / cimv2 -ComputerName 1 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo: InvalidOperation: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId: GetWMIManagementException, Microsoft.PowerShell.Commands.GetWmiObjectCommand

while if I do not use -Credential, it works correctly.

This is screenshot of the Discovery Log:

enter image description here

Moreover, I execute MID Server using administrator user.

Upvotes: 0

Views: 3233

Answers (1)

Sachidanand Dev
Sachidanand Dev

Reputation: 26

Try using localhost instead of ip without credentials Get-WmiObject -Class Win32_OperatingSystem -Namespace root / cimv2 -ComputerName localhost

Upvotes: 1

Related Questions