Skip to main content

Azure AD Status

Summary

This procedure queries the machine to determine if it is Azure AD joined or registered and updates the custom fields as necessary. These machines can then be filtered based on the views.

Example Agent Procedure Log

TimeActionStatusContact
2:44:13 pm 3-Apr-23Azure AD StatusSuccess THENproaccess@altourage.com
2:44:13 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)Success THENproaccess@altourage.com
2:44:12 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0016Powershell command complete. Results returned to global variable #global:psresult# and saved in Agent's Documents tab of server.proaccess@altourage.com
2:44:12 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0016Informational: GetFile command overwrote the server file D:/Kaseya/UserProfiles/483503347503094/GetFiles/../docs/psoutput.txt with the new contents from c:/kworking/psoutput.txt in THEN step 3.proaccess@altourage.com
2:44:05 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0011Executing 64-bit Powershell command as System: "" -command "if ((& "C:/Windows/System32/dsregcmd.exe" /statusSelect-String "WorkplaceJoined"
2:44:05 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0013Sending output to global variable.proaccess@altourage.com
2:44:04 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0008Custom commands detected as if ((& "C:/Windows/System32/dsregcmd.exe" /statusSelect-String "WorkplaceJoined"
2:44:04 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0003No Powershell file variable detected.proaccess@altourage.com
2:44:02 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0002Powershell is present.proaccess@altourage.com
2:44:00 pm 3-Apr-23Azure AD StatusChecking to see if machine is Azure AD Registeredproaccess@altourage.com
2:44:00 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)Success THENproaccess@altourage.com
2:43:59 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0016Powershell command complete. Results returned to global variable #global:psresult# and saved in Agent's Documents tab of server.proaccess@altourage.com
2:43:59 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0016Informational: GetFile command overwrote the server file D:/Kaseya/UserProfiles/483503347503094/GetFiles/../docs/psoutput.txt with the new contents from c:/kworking/psoutput.txt in THEN step 3.proaccess@altourage.com
2:43:53 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0011Executing 64-bit Powershell command as System: "" -command "if ((& "C:/Windows/System32/dsregcmd.exe" /statusSelect-String "AzureAdJoined"
2:43:53 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0013Sending output to global variable.proaccess@altourage.com
2:43:53 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0008Custom commands detected as if ((& "C:/Windows/System32/dsregcmd.exe" /statusSelect-String "AzureAdJoined"
2:43:52 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0003No Powershell file variable detected.proaccess@altourage.com
2:43:50 pm 3-Apr-23Execute Powershell Command (64-bit, Run As System)-0002Powershell is present.proaccess@altourage.com
2:43:48 pm 3-Apr-23Azure AD StatusChecking to see if machine is Azure AD Joinedproaccess@altourage.com
2:43:18 pm 3-Apr-23Run Now - Azure AD StatusAdmin proaccess@altourage.com scheduled procedure Run Now - Azure AD Status to run at Apr 3 2023 7:43 PMproaccess@altourage.com

Dependencies

The Agent Procedure relies upon views and custom fields in order to update properly.
Solution: Azure AD Status

Output

Procedure log files and custom fields.