Skip to main content

CWM - Automate - Script - Auto AAD to Autopilot - Client Specific (IT Synergy)

Summary​

This script will run the Optimize-Volume PowerShell command to defragment a drive whenever possible. If the command is not recognized, it will revert to using the standard defrag command. The script returns a verbose log of what the Optimize-Volume command outputs. Due to this being a simple log return, there typically would not be any known failure (there is never a failure log written with this agnostic solution) unless an environmental issue exists, which we are looking for in the script.

Sample Run​

< This should be a screenshot of a manual run of the script >

Screenshot

Dependencies​

This should be a list of ITGlue documents listed in the Related Items sidebar on which this script depends.

  • Agnostic Content Doc Link
  • Custom Table Doc Link
  • EDF Doc Link
  • etc.

Variables​

Global Parameters​

NameExampleRequiredDescription
The name of the parameterAn example value of the parameterTrue or FalseWhat the parameter represents

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

NameDescription
The name of the Script StateWhat the script state represents

User Parameters​

NameExampleRequiredDescription
The name of the parameterAn example value of the parameterTrue or FalseWhat the parameter represents

System Properties​

NameExampleRequiredDescription
The name of the propertyAn example value of the propertyTrue or FalseWhat the property represents

Script States​

NameExampleDescription
The name of the Script StateAn example of the Script StateWhat the script state represents

Process​

Describe the steps the script performs to accomplish the desired task. Note that if this script is just a front-end for a piece of Agnostic Content, then you can insert a link to the documentation for that content here instead.

Output​

The location and method by which this script returns data.

Example:

  • Script log
  • Script state
  • Local file on computer
  • Dataview
  • etc.

Changelog​

2025-04-10​

  • Initial version of the document