Troubleshooting

Use this section to diagnose and resolve common deployment and installation issues with AIS Shadow AI Agent Detection.

Enrolment failure - Device enrollment failed

  1. Check the Intune installer log:
    Get-Content "C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\AIS-ShadowAIAgentDetection-Install.log"

    Search for the text Device enrollment failed. Verify that the bootstrap token is valid, the tenant subdomain is correct, and the endpoint has outbound HTTPS access to https://ais.appvx.com.

  2. Check the detection agent log:
    Select-String -Path "C:\ProgramData\Ais\AIS-ShadowAIAgentDetection\detector.log" -Pattern "enroll|HTTP|error"
  3. Common causes:
    • Bootstrap token has expired.
    • Bootstrap token has reached its maximum use limit.
    • Bootstrap token belongs to a different tenant.
    • Endpoint cannot reach the API base URL.
    • Tenant subdomain is missing or incorrect.
    • API base URL is incorrect or not using HTTPS.

Scheduled task missing after reboot

If the scheduled task is missing after a system reboot or Windows Update cycle:

  1. Confirm that ais-shadow-ai-agent-detection-install.ps1 completed successfully by reviewing the installer log.
  2. Re-run ais-shadow-ai-agent-detection-install.ps1 manually with a valid bootstrap token, or trigger an Intune sync.
  3. Optionally, enable Intune Proactive Remediation with Detect.ps1 / ais-shadow-ai-agent-detection-install.ps1 to automatically restore the agent if it is removed.
  4. Manually verify the task:
    Get-ScheduledTask -TaskName "AppViewX AIS Shadow AI Agent Detection"

Detection script reports not installed

Run the detection script manually to identify the failure point:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File Detect.ps1

Check each of the following independently:

  1. Registry:
    Get-ItemProperty "HKLM:\SOFTWARE\AppViewX\AIS" -ErrorAction SilentlyContinue
  2. Installed marker:
    Test-Path "C:\ProgramData\AppViewX\AIS\installed.txt"
  3. Agent script:
    Test-Path "C:\Program Files\AppViewX\AIS\AIS-ShadowAIAgentDetection.ps1"

Wrong exit code in MDM

If MDM reports an unexpected exit code, inspect the installer log:

Get-Content "C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\AIS-ShadowAIAgentDetection-Install.log" -Tail 100