File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -3523,16 +3523,24 @@ Function AddFaxPrinter {
3523
3523
Add-Printer - Name " Fax" - DriverName " Microsoft Shared Fax Driver" - PortName " SHRFAX:" - ErrorAction SilentlyContinue
3524
3524
}
3525
3525
3526
- # Uninstall Windows Fax and Scan Services - Not applicable since 2004. Not applicable to Server
3526
+ # Uninstall Windows Fax and Scan Services - Not applicable to Server
3527
3527
Function UninstallFaxAndScan {
3528
3528
Write-Output " Uninstalling Windows Fax and Scan Services..."
3529
- Disable-WindowsOptionalFeature - Online - FeatureName " FaxServicesClientPackage" - NoRestart - WarningAction SilentlyContinue | Out-Null
3529
+ If ([System.Environment ]::OSVersion.Version.Build -ge 19041 ) {
3530
+ Get-WindowsCapability - Online | Where-Object { $_.Name -like " Print.Fax.Scan*" } | Remove-WindowsCapability - Online | Out-Null
3531
+ } Else {
3532
+ Disable-WindowsOptionalFeature - Online - FeatureName " FaxServicesClientPackage" - NoRestart - WarningAction SilentlyContinue | Out-Null
3533
+ }
3530
3534
}
3531
3535
3532
- # Install Windows Fax and Scan Services - Not applicable since 2004. Not applicable to Server
3536
+ # Install Windows Fax and Scan Services - Not applicable to Server
3533
3537
Function InstallFaxAndScan {
3534
3538
Write-Output " Installing Windows Fax and Scan Services..."
3535
- Enable-WindowsOptionalFeature - Online - FeatureName " FaxServicesClientPackage" - NoRestart - WarningAction SilentlyContinue | Out-Null
3539
+ If ([System.Environment ]::OSVersion.Version.Build -ge 19041 ) {
3540
+ Get-WindowsCapability - Online | Where-Object { $_.Name -like " Print.Fax.Scan*" } | Add-WindowsCapability - Online | Out-Null
3541
+ } Else {
3542
+ Enable-WindowsOptionalFeature - Online - FeatureName " FaxServicesClientPackage" - NoRestart - WarningAction SilentlyContinue | Out-Null
3543
+ }
3536
3544
}
3537
3545
3538
3546
# #########
You can’t perform that action at this time.
0 commit comments