ACC Visibility Reports the Previous Hostname After a Windows Host Is RenamedIssue .kb-wrapper { max-width: 100%; font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; } .kb-wrapper p { margin: 0 0 12px 0; } .kb-wrapper ul, .kb-wrapper ol { margin: 0 0 12px 24px; padding: 0; } .kb-wrapper li { margin: 0 0 6px 0; } .kb-wrapper a { color: #032D42; text-decoration: underline; } .kb-wrapper code { background: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; padding: 1px 4px; border-radius: 3px; font-family: Consolas, monospace; } Agent Client Collector for Visibility (ACC-V) continues to report the previous hostname after a Windows host is renamed. Symptoms .kb-wrapper { max-width: 100%; font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; } .kb-wrapper p { margin: 0 0 12px 0; } .kb-wrapper ul, .kb-wrapper ol { margin: 0 0 12px 24px; padding: 0; } .kb-wrapper li { margin: 0 0 6px 0; } .kb-wrapper a { color: #032D42; text-decoration: underline; } .kb-wrapper code { background: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; padding: 1px 4px; border-radius: 3px; font-family: Consolas, monospace; } A Windows host is renamed, but the ACC-V payload continues to contain the previous hostname.The hostname column returned from the osquery system_info table contains the previous hostname.Subsequent ACC-V collections continue to report the previous value until the Windows host is restarted. Facts .kb-wrapper { max-width: 100%; font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; } .kb-wrapper p { margin: 0 0 12px 0; } .kb-wrapper ul, .kb-wrapper ol { margin: 0 0 12px 24px; padding: 0; } .kb-wrapper li { margin: 0 0 6px 0; } .kb-wrapper a { color: #032D42; text-decoration: underline; } .kb-wrapper code { background: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; padding: 1px 4px; border-radius: 3px; font-family: Consolas, monospace; } ACC-V uses osquery to collect the Windows hostname.The hostname is read from system_info.hostname and included in the collection payload.ACC-V does not cache the hostname or store it in an ACC configuration file, registration record, or identity file.Windows establishes the computer name returned to applications at system startup by reading the value from the registry.A Windows computer name change does not take effect for all callers until the host is restarted. Release All Releases Cause .kb-wrapper { max-width: 100%; font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; } .kb-wrapper p { margin: 0 0 12px 0; } .kb-wrapper ul, .kb-wrapper ol { margin: 0 0 12px 24px; padding: 0; } .kb-wrapper li { margin: 0 0 6px 0; } .kb-wrapper a { color: #032D42; text-decoration: underline; } .kb-wrapper code { background: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; padding: 1px 4px; border-radius: 3px; font-family: Consolas, monospace; } The Windows hostname change has not taken effect at the operating-system level because the host has not been restarted. ACC-V reads the hostname live through osquery during collection. If the operating system continues to return the previous hostname, osquery and the ACC-V payload also contain that value. This behavior is not caused by ACC-V hostname caching. Resolution .kb-wrapper { max-width: 100%; font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; } .kb-wrapper p { margin: 0 0 12px 0; } .kb-wrapper ul, .kb-wrapper ol { margin: 0 0 12px 24px; padding: 0; } .kb-wrapper li { margin: 0 0 6px 0; } .kb-wrapper a { color: #032D42; text-decoration: underline; } .kb-wrapper code { background: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; padding: 1px 4px; border-radius: 3px; font-family: Consolas, monospace; } .kb-wrapper .kb-steps { list-style: none; counter-reset: kb-step; margin-left: 0; } .kb-wrapper .kb-steps > li { counter-increment: kb-step; position: relative; padding-left: 42px; margin-bottom: 14px; } .kb-wrapper .kb-steps > li::before { content: counter(kb-step); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%; background: #032D42; color: #63DF4E; font-weight: bold; line-height: 28px; text-align: center; } .kb-wrapper .kb-note { border-left: 4px solid #52B8FF; background: #e6f4ff; padding: 10px 12px; margin: 0 0 12px 0; } Open PowerShell on the affected Windows host. Run the following command: [System.Net.Dns]::GetHostName() Verify the returned hostname. If the command returns the previous hostname, the Windows rename operation has not taken effect at the operating-system level. Restart the Windows host to apply the computer name change. Restart the Agent Client Collector service after the host restart. Run [System.Net.Dns]::GetHostName() again and verify that it returns the new hostname. Run ACC-V Discovery and verify that the resulting payload reports the new hostname. Related Links .kb-wrapper { max-width: 100%; font-family: Lato, sans-serif; font-size: 12pt; line-height: 1.7; color: #000000; } .kb-wrapper p { margin: 0 0 12px 0; } .kb-wrapper ul, .kb-wrapper ol { margin: 0 0 12px 24px; padding: 0; } .kb-wrapper li { margin: 0 0 6px 0; } .kb-wrapper a { color: #032D42; text-decoration: underline; } .kb-wrapper code { background: #e6f0f5; color: #032D42; border: 1px solid #b8cfd8; padding: 1px 4px; border-radius: 3px; font-family: Consolas, monospace; } .kb-wrapper .kb-disclaimer { margin: -8px 0 12px 0; font-size: 10pt; font-style: italic; } How Agent Client Collector for Visibility Content works Agent Client Collector Visibility: Support and Troubleshooting GetComputerNameA function This link points to external content maintained by a third party. ServiceNow is not responsible for the accuracy or availability of content on external sites. Rename-Computer This link points to external content maintained by a third party. ServiceNow is not responsible for the accuracy or availability of content on external sites.