Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit 95a977a

Browse files
committed
Merge branch 'r3incarnat0r-features', closes #210
2 parents 5335241 + 241c2b3 commit 95a977a

File tree

2 files changed

+76
-17
lines changed

2 files changed

+76
-17
lines changed

Default.preset

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ DisableWebSearch # EnableWebSearch
1616
DisableAppSuggestions # EnableAppSuggestions
1717
DisableActivityHistory # EnableActivityHistory
1818
DisableBackgroundApps # EnableBackgroundApps
19-
DisableLocationTracking # EnableLocationTracking
19+
# DisableSensors # EnableSensors
20+
DisableLocation # EnableLocation
2021
DisableMapUpdates # EnableMapUpdates
2122
DisableFeedback # EnableFeedback
2223
DisableTailoredExperiences # EnableTailoredExperiences
2324
DisableAdvertisingID # EnableAdvertisingID
2425
DisableWebLangList # EnableWebLangList
2526
DisableCortana # EnableCortana
27+
# DisableBiometrics # EnableBiometrics
28+
# DisableCamera # EnableCamera
2629
DisableErrorReporting # EnableErrorReporting
2730
# SetP2PUpdateLocal # SetP2PUpdateInternet # SetP2PUpdateDisable
2831
DisableDiagTrack # EnableDiagTrack
@@ -181,6 +184,7 @@ DisableEdgePreload # EnableEdgePreload
181184
DisableEdgeShortcutCreation # EnableEdgeShortcutCreation
182185
DisableIEFirstRun # EnableIEFirstRun
183186
DisableFirstLogonAnimation # EnableFirstLogonAnimation
187+
DisableMediaSharing # EnableMediaSharing
184188
# UninstallMediaPlayer # InstallMediaPlayer
185189
# UninstallInternetExplorer # InstallInternetExplorer
186190
# UninstallWorkFolders # InstallWorkFolders

Win10.psm1

Lines changed: 71 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -206,26 +206,36 @@ Function EnableBackgroundApps {
206206
}
207207
}
208208

209-
# Disable Location Tracking
210-
Function DisableLocationTracking {
211-
Write-Output "Disabling Location Tracking..."
212-
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location")) {
213-
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Force | Out-Null
209+
# Disable sensor features, such as screen auto rotation
210+
Function DisableSensors {
211+
Write-Output "Disabling sensors..."
212+
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors")) {
213+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Force | Out-Null
214214
}
215-
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Name "Value" -Type String -Value "Deny"
216-
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" -Name "SensorPermissionState" -Type DWord -Value 0
217-
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" -Name "Status" -Type DWord -Value 0
215+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableSensors" -Type DWord -Value 1
218216
}
219217

220-
# Enable Location Tracking
221-
Function EnableLocationTracking {
222-
Write-Output "Enabling Location Tracking..."
223-
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location")) {
224-
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Force | Out-Null
218+
# Enable sensor features
219+
Function EnableSensors {
220+
Write-Output "Enabling sensors..."
221+
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableSensors" -ErrorAction SilentlyContinue
222+
}
223+
224+
# Disable location feature and scripting for the location feature
225+
Function DisableLocation {
226+
Write-Output "Disabling location services..."
227+
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors")) {
228+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Force | Out-Null
225229
}
226-
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Name "Value" -Type String -Value "Allow"
227-
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" -Name "SensorPermissionState" -Type DWord -Value 1
228-
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" -Name "Status" -Type DWord -Value 1
230+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableLocation" -Type DWord -Value 1
231+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableLocationScripting" -Type DWord -Value 1
232+
}
233+
234+
# Enable location feature and scripting for the location feature
235+
Function EnableLocation {
236+
Write-Output "Enabling location services..."
237+
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableLocation" -ErrorAction SilentlyContinue
238+
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableLocationScripting" -ErrorAction SilentlyContinue
229239
}
230240

231241
# Disable automatic Maps updates
@@ -338,6 +348,36 @@ Function EnableCortana {
338348
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "AllowCortana" -ErrorAction SilentlyContinue
339349
}
340350

351+
# Disable biometric features in Windows. Note - it's recommended to create a password recovery disk, if you log on using biometrics.
352+
Function DisableBiometrics {
353+
Write-Output "Disabling biometric services..."
354+
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Biometrics")) {
355+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Biometrics" -Force | Out-Null
356+
}
357+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Biometrics" -Name "Enabled" -Type DWord -Value 0
358+
}
359+
360+
# Enable biometric features
361+
Function EnableBiometrics {
362+
Write-Output "Enabling biometric services..."
363+
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Biometrics" -Name "Enabled" -ErrorAction SilentlyContinue
364+
}
365+
366+
# Disable use of camera devices
367+
Function DisableCamera {
368+
Write-Output "Disabling camera devices..."
369+
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera")) {
370+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera" -Force | Out-Null
371+
}
372+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera" -Name "AllowCamera" -Type DWord -Value 0
373+
}
374+
375+
# Enable use of camera devices
376+
Function EnableCamera {
377+
Write-Output "Enabling camera devices..."
378+
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Camera" -Name "AllowCamera" -ErrorAction SilentlyContinue
379+
}
380+
341381
# Disable Error reporting
342382
Function DisableErrorReporting {
343383
Write-Output "Disabling Error reporting..."
@@ -3001,6 +3041,21 @@ Function EnableFirstLogonAnimation {
30013041
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableFirstLogonAnimation" -ErrorAction SilentlyContinue
30023042
}
30033043

3044+
# Disable Windows Media Player's media sharing feature
3045+
Function DisableMediaSharing {
3046+
Write-Output "Disabling media sharing..."
3047+
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer")) {
3048+
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Force | Out-Null
3049+
}
3050+
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Name "PreventLibrarySharing" -Type DWord -Value 1
3051+
}
3052+
3053+
# Enable Windows Media Player's media sharing feature
3054+
Function EnableMediaSharing {
3055+
Write-Output "Enabling media sharing..."
3056+
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsMediaPlayer" -Name "PreventLibrarySharing" -ErrorAction SilentlyContinue
3057+
}
3058+
30043059
# Uninstall Windows Media Player
30053060
Function UninstallMediaPlayer {
30063061
Write-Output "Uninstalling Windows Media Player..."

0 commit comments

Comments
 (0)