Forum Discussion

evecaviedes's avatar
evecaviedes
Icon for Neophyte rankNeophyte
7 months ago

DataSource with PowerShell script

Hi everyone,

I would like to monitor AD Sync. The collector is on a Linux server, and the application is on a Windows one. I am trying to create a DataSource based on a PowerShell script, but I fund out I should set the config file of the collector with PowerShell. policy unrestricted. I don't wanna do this for security reasons. Not sure what else I can do to get that info. I would appreciate it if someone could give me some ideas. Thanks.

  • You are going to run into more problems than that with a Linux Collector. LogicMonitor doesn't let you use a PowerShell script via a Linux Collector. Generally, the easiest way to monitor Active Directory, is to install the collector directly on the Domain Controller.

    • Embedded PowerShell scripting: available only on Windows Collectors, but allows for collection from systems that expose data via PowerShell cmdlets
  • You are going to run into more problems than that with a Linux Collector. LogicMonitor doesn't let you use a PowerShell script via a Linux Collector. Generally, the easiest way to monitor Active Directory, is to install the collector directly on the Domain Controller.

    • Embedded PowerShell scripting: available only on Windows Collectors, but allows for collection from systems that expose data via PowerShell cmdlets
    • evecaviedes's avatar
      evecaviedes
      Icon for Neophyte rankNeophyte

      Thanks Joe, this is the easiest solution but I dont think I can do it. I hadn't noticed PowerShell is just available on Windows :O

  • By "AD Sync" do you mean Active Directory Sync do you mean AD replication between domain controllers, or ADConnect (aka DirSync) which syncs AD with M365/AzureAD/EntraID?

    If it's ADConnect I would normally use the MSOnline module and Get-MsolCompanyInformation's LastDirSyncTime but this module likely requires Windows. It does seem that MS Graph API does seem have access to sync info, although it may take some work to write up the code to directly query Graph API.

    • evecaviedes's avatar
      evecaviedes
      Icon for Neophyte rankNeophyte

      Thanks Mike, It seems like a viable solution. I will try it.