-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindowsFixKit.psm1
More file actions
46 lines (41 loc) · 1.3 KB
/
Copy pathWindowsFixKit.psm1
File metadata and controls
46 lines (41 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<#
.SYNOPSIS
Root Module for WindowsFixKit PowerShell Tooling.
.DESCRIPTION
Exposes unified commands to invoke WindowsFixKit diagnostics, system audits, and remediations.
#>
function Invoke-WindowsFixKit {
[CmdletBinding()]
param(
[Parameter(Mandatory = $false)]
[ValidateSet("UpdateRepair", "Full", "ScanOnly", "StorageCleanup", "NetworkReset", "WiFiFix", "BluetoothFix")]
[string]$DiagnosisType = "UpdateRepair",
[switch]$NonInteractive
)
$moduleRoot = $PSScriptRoot
$scriptsDir = Join-Path $moduleRoot "scripts"
switch ($DiagnosisType) {
"UpdateRepair" {
& (Join-Path $scriptsDir "diagnose.ps1")
}
"Full" {
& (Join-Path $scriptsDir "full_system_diagnosis.ps1")
}
"ScanOnly" {
& (Join-Path $scriptsDir "diagnose.ps1") -ScanOnly
}
"StorageCleanup" {
& (Join-Path $scriptsDir "fix_storage_cleanup.ps1")
}
"NetworkReset" {
& (Join-Path $scriptsDir "fix_network_reset.ps1")
}
"WiFiFix" {
& (Join-Path $scriptsDir "fix_wifi_missing.ps1")
}
"BluetoothFix" {
& (Join-Path $scriptsDir "fix_bluetooth_missing.ps1")
}
}
}
Export-ModuleMember -Function Invoke-WindowsFixKit