Commit graph

13 commits

Author SHA1 Message Date
Adam Baali
5a660613db
Add and document fallback script for wiping Windows devices (#42230)
Add fallback wipe script for Windows hosts (#34994)

When Fleet's built-in Windows wipe action fails (MDM command returns
status 500, device not wiped), there is no documented fallback. This PR
adds a script that can be run via Fleet to wipe the device when the
native wipe fails.

## Changes

- `docs/solutions/windows/scripts/wipe-windows-device.ps1` - Fallback
wipe script
- `articles/lock-wipe-hosts.md` - Reference to fallback script added
under Windows wipe section

## What the script does

1. Validates and repairs WinRE if disabled (confirmed root cause of wipe
failures in #34994)
2. Checks Component Store integrity via DISM
3. Suspends BitLocker for one reboot cycle
4. Triggers wipe via WMI-to-CSP bridge (`doWipeProtected`, falls back to
`doWipe`), bypassing the MDM command queue

Fully unattended. No user interaction required. Exits 0 on success, 1 on
failure.

## Context

Every fully unattended Windows wipe method uses the same RemoteWipe CSP.
There is no alternative Windows API. This script adds value by fixing
the root causes before calling the wipe, and by bypassing the MDM
command queue where server-side failures (DB timeouts, auth errors) can
occur.

Closes #34994

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added an administrator-only Windows device wipe utility that performs
staged system checks (recovery environment, system health, and disk
protection), attempts to suspend drive protection for a reboot, invokes
multiple local wipe triggers with fallbacks, creates a timestamped audit
log of actions, and provides clear success/failure summaries with likely
causes and suggested next steps.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Marko Lisica <83164494+marko-lisica@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
2026-04-16 11:49:53 -04:00
Adam Baali
9ed65628df
Combine Windows MDM migration remediation into single script (#41537) 2026-03-13 08:59:27 +01:00
Steven Palmesano
4a5e22137f
Add fleetd debug script for Windows (#40831)
Also rename the macOS script for consistency.
2026-03-02 15:41:25 -06:00
Steven Palmesano
c303f7f0e6
Windows scripts update (#40107)
- Add install ChatGPT script.
- Update turn on MDM script with some changes from the script above.

I tested the turn on MDM script after making these updates.
2026-02-19 13:58:10 -06:00
Adam Baali
f2f1f66d11
Add Windows MDM migration troubleshooting scripts and guide (#39548)
Closes #38916
Related: #34993, #33985, fleetdm/confidential#13228

## Changes

**Article update** (`articles/windows-mdm-setup.md`)
- Adds "Migrating from another MDM solution" subsection under **Manual
enrollment** with overview of common migration issues and links to
remediation scripts

**New scripts** (`docs/solutions/windows/scripts/`)
- `reset-mdm-enrollment-flag.ps1` — Resets MmpcEnrollmentFlag blocking
MDM status after migration
- `remove-stale-mdm-enrollment-records.ps1` — Clears orphaned enrollment
GUIDs, AAD discovery cache, and MS DM Server cache
- `fix-workplace-join-configuration.ps1` — Re-enables
Automatic-Device-Join task and configures Workplace Join policies
- `remove-unreachable-wsus-configuration.ps1` — Removes unreachable WSUS
server config that breaks Windows Update

## Context

Customers migrating Windows hosts from Intune to Fleet have been hitting
recurring enrollment issues, MDM status stuck on "Off," enrollment
errors (`0x80190190`, `0x8018000a`), and Windows Update breakage from
leftover RMM agents. These scripts consolidate the workarounds from
multiple customer engagements into self-serve remediation that can be
deployed via **Controls > Scripts**.

---------

Co-authored-by: Marko Lisica <83164494+marko-lisica@users.noreply.github.com>
2026-02-11 15:20:26 +01:00
Dale Ribeiro
9b532c9936
Solutions folder script name cleanup (#38951) 2026-01-29 20:39:20 -05:00
Josh Roskos
a38ca21d2d
Add downloadCloudflareWARP.ps1 (#38933)
Created for `customer-calabria`. Installs Cloudflare WARP and adds
variables for common organization configuration options.
```
# Define variables
$downloadUrl = "https://downloads.cloudflareclient.com/v1/download/windows/ga"
$tempDir = $env:TEMP
$installerPath = Join-Path $tempDir "Cloudflare_WARP.msi"
$organization = "your-team-name"   # Replace with your Cloudflare Zero Trust organization name
$serviceMode = "1dot1"             # Gateway with DoH mode (options: warp, 1dot1, proxy, postureonly, tunnelonly)
$autoConnect = 2                   # Auto-reconnect after N minutes (0 = indefinite off, 1-1440 = minutes)
$displayName = "display-name"      # Organization display name in WARP GUI
$onboarding = $false               # Show privacy policy screens on first launch
$switchLocked = $true              # Prevent users from manually disabling WARP
```
2026-01-28 15:25:40 -05:00
Steven Palmesano
819ae07d3d
Improve Windows migrate to Fleet notification (#37310)
This version shows the notification every five minutes, has a custom
title, runs in the user context, and has a more detailed message since
we no longer have the 255 character limit.

---------

Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
2025-12-17 15:35:44 -06:00
Steven Palmesano
7fb0ab105a
Windows MDM migration notification (#36525)
Related to https://github.com/fleetdm/confidential/issues/12925

---------

Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
2025-12-08 14:10:46 -06:00
Dale Ribeiro
573d493bb5
Dale solutions cleanup 2 (#35108)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] If paths of existing endpoints are modified without backwards
compatibility, checked the frontend/CLI for any necessary changes

## Testing

- [ ] Added/updated automated tests
- [ ] Where appropriate, [automated tests simulate multiple hosts and
test for host
isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing)
(updates to one hosts's records do not affect another)

- [ ] QA'd all new/changed functionality manually

For unreleased bug fixes in a release candidate, one of:

- [ ] Confirmed that the fix is not expected to adversely impact load
test results
- [ ] Alerted the release DRI if additional load testing is needed

## Database migrations

- [ ] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [ ] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [ ] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).

## New Fleet configuration settings

- [ ] Setting(s) is/are explicitly excluded from GitOps

If you didn't check the box above, follow this checklist for
GitOps-enabled settings:

- [ ] Verified that the setting is exported via `fleetctl
generate-gitops`
- [ ] Verified the setting is documented in a separate PR to [the GitOps
documentation](https://github.com/fleetdm/fleet/blob/main/docs/Configuration/yaml-files.md#L485)
- [ ] Verified that the setting is cleared on the server if it is not
supplied in a YAML file (or that it is documented as being optional)
- [ ] Verified that any relevant UI is disabled when GitOps mode is
enabled

## fleetd/orbit/Fleet Desktop

- [ ] Verified compatibility with the latest released version of Fleet
(see [Must
rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md))
- [ ] If the change applies to only one platform, confirmed that
`runtime.GOOS` is used as needed to isolate changes
- [ ] Verified that fleetd runs on macOS, Linux and Windows
- [ ] Verified auto-update works from the released version of component
to the new version (see [tools/tuf/test](../tools/tuf/test/README.md))
2025-11-03 11:30:04 -05:00
Jake Stenger
81faf4e9cb
organize files into platform, function folders. Standardize filenames… (#34659)
… for easier readibility. Standardize on 2-space indentation.
2025-10-22 17:07:33 -04:00
Mason Buettner
b3fa01a144
Add disable-insider-ui-page.ps1 (#34499)
This script disables the UI page where users can opt into the Windows
insider program.


# Checklist for submitter

If some of the following don't apply, delete the relevant line.

## Testing

- [x] QA'd all new/changed functionality manually

---------

Co-authored-by: Dale Ribeiro <dale@fleetdm.com>
2025-10-22 13:57:12 -04:00
Brock Walters
92a58851fa
Added new Set_ScreenSaverGracePeriod.ps1 script (#34340)
This script is part of the CSA project to create Windows controls for
customer-rembrandt.
2025-10-16 11:08:36 -05:00