theonlyway / Set-Privacy

PowerShell script to batch-change privacy settings in Windows 10

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set-Privacy.ps1

PowerShell script to batch-change privacy settings in Windows 10

Description

With so many different privacy settings in Windows 10, it makes sense to have a script to change them.

This is still a work in progress. My current Windows 10 setup does not allow me to test all the various privacy settings.

Requirements

  • Windows 10 or Windows Server 2016

##Getting the script

There are several ways to get the script file to your computer, download the zip, clone the repository, save the content manually into a file. You can also get it with PowerShell:

Open a PowerShell window, first cd into a directory of your choice to store the script in, e.g.:

cd ~\Downloads

then download the script by running the following:

(New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/hahndorf/Set-Privacy/master/Set-Privacy.ps1') | out-file .\Set-Privacy.ps1 -force 

After downloading a PowerShell script from the Internet, you should always review it to make sure it doesn't do anything bad.

##Running the script

Assuming you are still in the location you downloaded the script to, run it with one of the required parameters:

.\Set-Privacy.ps1 -Strong

this sets the privacy settings for the current user to Strong, you also have the choice of Default (same as the Windows Express Setup settings) and Balanced (somewhere in the middle)

There are some settings for the whole computer rather than individual users, to change those run with the -admin switch

.\Set-Privacy.ps1 -Strong -admin

###Getting more help

To find out more about the parameters you can use for the script:

help .\Set-Privacy.ps1 -full

##Problems running the script

You may get one of the following messages when trying to run a script:

Execution Policy

...Set-Privacy.ps1 cannot be loaded because running scripts is disabled on this system...

PowerShell doesn't allow the execution of unsigned scripts, to allow the execution of local unsigned scripts for this session run:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force

To change the execution policy permanently, run:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force

##What does the script change?

Here's a list of things the three different modes (-Default,-Balanced,-Strong) change.

A * means the feature will be enabled, a - means it will be disabled.

The names can be used with the -Feature parameter to specify individual settings to change.

Privacy Section (per user)
Name Default Balanced Strong Info
AdvertisingId * - - Let apps use my advertising ID for experience across apps
ImproveTyping * - - Send Microsoft info about how to write to help us improve typing and writing in the future
SmartScreen * * - SmartScreen Filter
LanguageList * * - Let websites provice locally relevant content by accessing my language list
Location * - - Use location information for this user account
Camera * - - Let apps use my camera
Microphone * - - Let apps use my microphone
SpeachInkingTyping * - - 'Getting to know you' - monitoring voice input, inking and typing for Cortana
AccountInfo * - - Let apps access my name, picture, and other account info
Contacts * - - Apps that can access your contacts
Calendar * - - Let apps access my calandar
Messaging * - - Let apps read or send messages (text or MMS)
Radios * - - Let apps use Bluetooth and other radios
OtherDevices * - - Let app share and sync data with other devices
FeedbackFrequency * - - Windows should ask for my feedback
DoNotTrack - * * Edge - Add a Do-Not-Track http header
SearchSuggestions * - - Edge - Search suggestions
PagePrediction * - - Edge - Preload expected pages
PhishingFilter * - - Edge - SmartScreen filter for malicious sites
-admin switch (machine scope)
Name Default Balanced Strong Info
ShareUpdates * + - In addition to get updates from Microsoft share updates on local network (+) or with the Internet (*)
WifiSense * - - Sharing of Wi-Fi password and using Wi-Fi sense to connect to networks.
Telemetry * - - Diagnostic and usage data
SpyNet * * - Windows Defender, cloud-based Protection and sample submission

About

PowerShell script to batch-change privacy settings in Windows 10

License:MIT License


Languages

Language:PowerShell 100.0%