# Detection script details

This page contains the detection script behaviour and inputs/outputs for Win-Storage-Detect.ps1.

View Detection Script on GitHub

  • Logic
  • Inputs
  • Outputs

# Logic

  • Obtains the hostname.
  • Evaluates the last character of the hostname against the current day to determine if the script should run today (this step can be removed or customised as needed).
  • Evaluates available storage space.

# Inputs

  • $storageThreshold: The minimum free storage threshold in GB. Default is 40.

# Outputs

  • Exit codes:
    • 0: Compliant (Available storage exceeds the threshold).
    • 1: Not compliant (Available storage is below the threshold).