Skip to content

Instantly share code, notes, and snippets.

@MyITGuy
Created February 4, 2020 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MyITGuy/7d9c53d05ad4bd96d7a633425e51ec7d to your computer and use it in GitHub Desktop.
Save MyITGuy/7d9c53d05ad4bd96d7a633425e51ec7d to your computer and use it in GitHub Desktop.
Change GUID then force client to update configuration and send basic inventory
Stop-Service -Name AeXNSClient -Force
$sNewGuid = [System.Guid]::NewGuid().ToString('B').ToUpper()
New-ItemProperty -Path Registry::"HKLM\Software\Altiris\Altiris Agent" -Name "MachineGuid" -PropertyType "String" -Value $sNewGuid -Force
New-ItemProperty -Path Registry::"HKLM\SOFTWARE\Altiris\Client Service" -Name "NSMachineGuid" -PropertyType "String" -Value $sNewGuid -Force
New-ItemProperty -Path Registry::"HKLM\SOFTWARE\Altiris\eXpress" -Name "MachineGuid" -PropertyType "String" -Value $sNewGuid -Force
New-ItemProperty -Path Registry::"HKLM\SOFTWARE\Altiris\eXpress\NS Client" -Name "MachineGuid" -PropertyType "String" -Value $sNewGuid -Force
New-ItemProperty -Path Registry::"HKLM\SOFTWARE\Computing Edge\Notification Server" -Name "MachineGuid" -PropertyType "String" -Value $sNewGuid -Force
Start-Service -Name AeXNSClient
$InstallDir = (Get-ItemProperty -Path Registry::"HKLM\SOFTWARE\Altiris\Altiris Agent" -Name "InstallDir")."InstallDir"
& "$InstallDir\AeXAgentUtil.exe" /sendbasicinventory
& "$InstallDir\AeXAgentUtil.exe" /updateconfiguration
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell" )
Dim TypeLib, sNewGuid
Set TypeLib = CreateObject("Scriptlet.TypeLib" )
sNewGUID = TypeLib.Guid
Set TypeLib = Nothing
sNewGuid = left(sNewGUID, len(sNewGUID)-2)
' wscript.echo " # Guid Generated " + sNewGuid
WshShell.RegWrite "HKLM\Software\Altiris\Altiris Agent\MachineGuid" ,sNewGuid, "REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Altiris\Client Service\NSMachineGuid" ,sNewGuid, "REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Altiris\eXpress\MachineGuid" ,sNewGuid, "REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Altiris\eXpress\NS Client\MachineGuid" ,sNewGuid, "REG_SZ"
WshShell.RegWrite "HKLM\SOFTWARE\Computing Edge\Notification Server\MachineGuid" ,sNewGuid, "REG_SZ"
Dim client
Set client=WScript.CreateObject ("Altiris.AeXNSClient" )
ignoreBlockouts=1
sendIfUnchanged = 1
client.SendBasicInventory sendIfUnchanged, ignoreBlockouts
client.UpdatePolicies ignoreBlockouts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment