You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sample discovery script to me anyway, seemed short on a practical example that a customer could build upon, and made it harder to understand at first glance, what the script should actually be doing.
I've suggested using some code to first gather the results from the device, and then feed it into the hash, as I think it would help understanding. I've also removed the line in the output script that referenced a Microsoft employee's username - I don't think it is necessary to show the script being run, but just the actual output.
Copy file name to clipboardExpand all lines: memdocs/intune/protect/compliance-custom-script.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ The discovery script:
35
35
36
36
- Is added to Intune before you create a compliance policy. After it's added, it will be available to select when you create a compliance policy with custom settings.
37
37
- Runs on a device that receives the compliance policy. The script evaluates the conditions of the JSON file you upload to the same policy.
38
-
- Identifies one or more settings, as defined in the JSON, and returns a list of discovered values for those settings. A single script can be assigned to each policy, and supports discovery of multiple settings.
38
+
- Identifies one or more settings, as defined in the JSON, and returns a list of discovered values for those settings. A single script can be assigned to each policy, and supports discovery of multiple settings.
39
39
- Must be compressed to output results in one line. For example: `$hash = @{ ModelName = "Dell"; BiosVersion = "1.24"; TPMChipPresent = $true}`
40
40
- Must include the following line at the end of the script: `return $hash | ConvertTo-Json -Compress`
0 commit comments