Setting hostname on server post the Discovery job runs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 02:53 AM
Hi,
We are having servers which are being updated by Discovery and the hostname is being populated with the windows registry : 'HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters',
However the hostname returned is combination of server name +dns name , this is happening for windows 2019.
When the same server was on OS windows 2012 (probes running ) then it was just returning the server name.
Note : Windows 2012 server is still running with probes and windows 2019 is using pattern in our instance.
Can we have a way to update windows server name excluding DNS part in the windows 2019 machines?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2023 08:45 AM
You need to write pre/post processing script in servicenow.
In the script fetch the value of OS that is windows server 2012 and use if condition so that only it runs for windows 2012.
In the post processing script parse the json data coming from discovery probe and fetch the hostname value.
use string split function to extract the first part of the string .
Anshu