Created
February 4, 2020 18:22
-
-
Save MyITGuy/7d9c53d05ad4bd96d7a633425e51ec7d to your computer and use it in GitHub Desktop.
Change GUID then force client to update configuration and send basic inventory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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