Skip to content

Commit 392b341

Browse files
Correct docs: new function, ConvertTo-Array change, detection fail-open
Get-IntuneGraphHeaders is new on this branch, so changing its parameter name is not a breaking change; the changelog and analyzer-settings comment said otherwise. The changelog now discloses that ConvertTo-Array processes each pipeline item. README states that a detection script which cannot read its state (Detect-OfficeUpdateChannel) exits 0 with "Cannot determine", the one deliberate exception to "a script that could not finish does not exit 0". The changelog also records the beta deviceStatuses call and the smart card write order. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DTrMSXN5wTpRJ4nUgD1bRi
1 parent a52f32d commit 392b341

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ Fixes from the 2026-11-18 audit. See the commit messages for the reasoning behin
2828
### Changed
2929

3030
- `Remove-ODataInjectionChars` and `Test-ODataFilterInput` double single quotes instead of deleting them.
31-
- `Get-IntuneGraphHeaders` takes `-AppRegistration`.
31+
- `ConvertTo-Array` now has a process block, so it handles each item of a pipeline instead of only the last. Callers that piped several items and relied on that now get all of them.
32+
- `Get-IntuneGraphHeaders` is new on this branch and takes `-AppRegistration`; it is not a change to an existing signature.
33+
- Graph reports use the beta endpoint for `mobileApps/{id}/deviceStatuses` (Win32 per-device install state), because Microsoft documents it only there.
34+
- `Enable-SmartCardLogonEnforcement.ps1` writes `scforceoption` last, only if every other step succeeded, and puts the old value back if its own write or read-back fails.

‎PSScriptAnalyzerSettings.psd1‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# These are interactive console scripts. Write-Host output for an operator is intended.
77
'PSAvoidUsingWriteHost',
88

9-
# Style rule only. Get-GraphApiAllPages, Get-IntuneGraphHeaders, Get-ProxySettings and
10-
# Remove-ODataInjectionChars are public names that other scripts may already call.
9+
# Style rule only. Get-GraphApiAllPages, Get-ProxySettings and Remove-ODataInjectionChars
10+
# were already named this way before this branch, and other scripts may call them.
1111
'PSUseSingularNouns'
1212
)
1313
}

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ These scripts are tested with Pester against mocks. Nothing here has been run ag
3131

3232
The scripts are grouped by purpose and follow these rules:
3333

34-
- Error handling that ends in an exit code you can rely on. A script that could not finish does not exit 0.
34+
- Error handling that ends in an exit code you can rely on. A script that could not finish does not exit 0. The one deliberate exception is a detection script that cannot read the state it checks (`Detect-OfficeUpdateChannel.ps1` without registry or network access): it exits 0 and says "Cannot determine", so Intune does not run a remediation that cannot succeed either.
3535
- `-WhatIf` on every script that changes the machine. A `-WhatIf` run changes nothing and exits 0.
3636
- Input validation on IDs, user names and paths.
3737
- Reports that fail loudly. When a Graph request fails, the report row says so and the script exits 1. A blank value never stands for "the request failed".
@@ -388,7 +388,7 @@ Retrieves configuration profile and compliance policy assignments with their tar
388388

389389
#### `Get-IntuneWin32AppDetails.ps1` (Reporting)
390390

391-
Retrieves Win32 app details and assignments. With `-DeviceId` it adds the install state Intune reports for that device (`mobileApps/{id}/deviceStatuses`): `installed`, `failed`, `notInstalled`, `pendingInstall` and so on, or `NotReported` when Intune has no row for that app on that device. That is one extra request per app.
391+
Retrieves Win32 app details and assignments. With `-DeviceId` it adds the install state Intune reports for that device (`mobileApps/{id}/deviceStatuses`, which exists only in the Graph beta endpoint): `installed`, `failed`, `notInstalled`, `pendingInstall` and so on, or `NotReported` when Intune has no row for that app on that device. That is one extra request per app.
392392

393393
```powershell
394394
.\Reporting\Get-IntuneWin32AppDetails.ps1

0 commit comments

Comments
 (0)