Skip to main content

Azure AD Connect Version Audit

Summary

This document describes the process of running a PowerShell script to gather the Azure AD Connect version number and populates it into the custom field xPVAL Azure AD Version.

Sample Run

TimeActionStatusUser
2:43:34 pm 6-May-22Azure AD Connect Version AuditSuccess THENprovaltech.com/dan.hicks
2:43:34 pm 6-May-22Azure AD Connect Version Audit-0001xPVAL Azure AD Connect Version custom field has been filled. Version: 1.6.16.0provaltech.com/dan.hicks
2:43:34 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)Success THENprovaltech.com/dan.hicks
2:43:34 pm 6-May-22Execute 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.provaltech.com/dan.hicks
2:43:34 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0016Informational: GetFile command overwrote the server file C:/Kaseya/UserProfiles/883108838840010/GetFiles/../docs/psoutput.txt with the new contents from c:/provaltech/psoutput.txt in THEN step 3.provaltech.com/dan.hicks
2:43:31 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0011Executing 64-bit PowerShell command as System: -file "C:/ProgramData/_automation/AgentProcedure/AzureADConnectVersionAudit/Get-AzureADConnectVersion.ps1" "" >"c:/provaltech/psoutputtmp.txt"provaltech.com/dan.hicks
2:43:31 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0013Sending output to global variable.provaltech.com/dan.hicks
2:43:31 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0007No command variable detected.provaltech.com/dan.hicks
2:43:31 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0006PowerShell command specified as C:/ProgramData/_automation/AgentProcedure/AzureADConnectVersionAudit/Get-AzureADConnectVersion.ps1provaltech.com/dan.hicks
2:43:30 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0002PowerShell is present.provaltech.com/dan.hicks
2:43:29 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)Success THENprovaltech.com/dan.hicks
2:43:29 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0014PowerShell command completed!provaltech.com/dan.hicks
2:43:29 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0011Executing 64-bit PowerShell command as System: "" -command "New-Item -type Directory -Path C:/ProgramData/_automation/AgentProcedure -Name AzureADConnectVersionAudit" ""provaltech.com/dan.hicks
2:43:29 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0013Not sending output to variable.provaltech.com/dan.hicks
2:43:29 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0008Custom commands detected as New-Item -type Directory -Path C:/ProgramData/_automation/AgentProcedure -Name AzureADConnectVersionAuditprovaltech.com/dan.hicks
2:43:29 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0003No PowerShell file variable detected.provaltech.com/dan.hicks
2:43:28 pm 6-May-22Execute PowerShell Command (64-bit, Run As System)-0002PowerShell is present.provaltech.com/dan.hicks
2:43:22 pm 6-May-22Run Now - Azure AD Connect Version AuditAdmin provaltech.com/dan.hicks scheduled procedure Run Now - Azure AD Connect Version Audit to run at May 6 2022 2:43 PM

Copy and paste the Agent Procedure Log showing all steps below.

Dependencies

Variables

Document the various variables in the script. Delete any section that is not relevant to your script.

NameDescription
#version#Contains the Azure AD Connect Version Number, or "Not Installed" if the software wasn't found.

Process

  • Downloads PS1 from Get-AzureADConnectVersion.ps1
  • Creates the working directory
  • Runs the PS Script
  • Gathers output from Data log and saves to the #version# variable
  • Populates CF with Version.

Output

  • $PSScriptRoot/Get-AzureADConnectVersion-DATA.txt
  • Agent Procedure Log

Export Attachment

Attach the content XML VSA Export to this document.