@@ -387,7 +387,8 @@ Function EnableCortana {
387
387
Remove-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\InputPersonalization" - Name " AllowInputPersonalization" - ErrorAction SilentlyContinue
388
388
}
389
389
390
- # Disable biometric features in Windows. Note - it's recommended to create a password recovery disk, if you log on using biometrics.
390
+ # Disable biometric features
391
+ # Note: If you log on using biometrics (fingerprint, Windows Hello etc.) it's recommended to create a password recovery disk before applying this tweak.
391
392
Function DisableBiometrics {
392
393
Write-Output " Disabling biometric services..."
393
394
If (! (Test-Path " HKLM:\SOFTWARE\Policies\Microsoft\Biometrics" )) {
@@ -402,33 +403,35 @@ Function EnableBiometrics {
402
403
Remove-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Biometrics" - Name " Enabled" - ErrorAction SilentlyContinue
403
404
}
404
405
405
- # Disable access to camera from UWP apps
406
+ # Disable access to camera
407
+ # Note: This disables access using standard Windows API. Direct access to device will still be allowed.
406
408
Function DisableCamera {
407
- Write-Output " Disabling access to camera from UWP apps ..."
408
- If (! (Test-Path " HKLM:\SOFTWARE\Policies\Microsoft\Camera " )) {
409
- New-Item - Path " HKLM:\SOFTWARE\Policies\Microsoft\Camera " - Force | Out-Null
409
+ Write-Output " Disabling access to camera..."
410
+ If (! (Test-Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy " )) {
411
+ New-Item - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy " - Force | Out-Null
410
412
}
411
- Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Camera " - Name " AllowCamera " - Type DWord - Value 0
413
+ Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy " - Name " LetAppsAccessCamera " - Type DWord - Value 2
412
414
}
413
415
414
- # Enable access to camera in UWP apps
416
+ # Enable access to camera
415
417
Function EnableCamera {
416
- Write-Output " Enabling access to camera from UWP apps ..."
417
- Remove-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Camera " - Name " AllowCamera " - ErrorAction SilentlyContinue
418
+ Write-Output " Enabling access to camera..."
419
+ Remove-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy " - Name " LetAppsAccessCamera " - ErrorAction SilentlyContinue
418
420
}
419
421
420
- # Disable access to microphone in UWP apps
422
+ # Disable access to microphone
423
+ # Note: This disables access using standard Windows API. Direct access to device will still be allowed.
421
424
Function DisableMicrophone {
422
- Write-Output " Disabling access to microphone in UWP apps ..."
425
+ Write-Output " Disabling access to microphone..."
423
426
If (! (Test-Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" )) {
424
427
New-Item - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" - Force | Out-Null
425
428
}
426
429
Set-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" - Name " LetAppsAccessMicrophone" - Type DWord - Value 2
427
430
}
428
431
429
- # Enable access to microphone in UWP apps
432
+ # Enable access to microphone
430
433
Function EnableMicrophone {
431
- Write-Output " Enabling access to microphone from UWP apps ..."
434
+ Write-Output " Enabling access to microphone..."
432
435
Remove-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" - Name " LetAppsAccessMicrophone" - ErrorAction SilentlyContinue
433
436
}
434
437
0 commit comments