GithubHelp home page GithubHelp logo

set-privacy's People

Contributors

hahndorf avatar iainnicol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

set-privacy's Issues

Warnings on first run

On the first run of Set-Privacy.ps1 after a fresh install of Windows 10, I'm seeing a bunch of warnings:

PS > .\Set-Privacy.ps1 -Strong -Admin
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config\DODownloadMode changed to 0
HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\WiFiSenseCredShared changed to 0
HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\WiFiSenseOpen changed to 0
HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection\AllowTelemetry changed to 0
You cannot call a method on a null-valued expression.
At Set-Privacy.ps1:447 char:9
+         $acl = $key.GetAccessControl()
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At Set-Privacy.ps1:448 char:9
+         $acl.SetOwner([System.Security.Principal.NTAccount]$adminGrou ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At Set-Privacy.ps1:449 char:9
+         $key.SetAccessControl($acl)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At Set-Privacy.ps1:452 char:9
+         $acl.SetAccessRule($rule)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At Set-Privacy.ps1:453 char:9
+         $key.SetAccessControl($acl)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

HKLM:\SOFTWARE\Microsoft\Windows Defender\Spynet\SpyNetReporting changed to 0
HKLM:\SOFTWARE\Microsoft\Windows Defender\Spynet\SubmitSamplesConsent changed to 0
You cannot call a method on a null-valued expression.
At Set-Privacy.ps1:467 char:9
+         $acl.RemoveAccessRule($rule) | Out-Null
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At Set-Privacy.ps1:468 char:9
+         $key.SetAccessControl($acl)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Privacy settings changed

On the second run, everything seems to work fine:

PS > .\Set-Privacy.ps1 -Strong -Admin
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config\DODownloadMode already set to 0
HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\WiFiSenseCredShared already set to 0
HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\WiFiSenseOpen already set to 0
HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection\AllowTelemetry already set to 0
HKLM:\SOFTWARE\Microsoft\Windows Defender\Spynet\SpyNetReporting already set to 0
HKLM:\SOFTWARE\Microsoft\Windows Defender\Spynet\SubmitSamplesConsent already set to 0
Privacy settings changed

So it looks the script assumes a number of registry keys exist and it outputs warnings when they don't exist. The script must create those keys, because subsequent runs don't output warnings.

It's not a big deal by any means. Just thought I'd report it, since I think it might be confusing to many first-time users.

Brilliant script btw. I was expecting I'd have to write something like it myself, but Set-Privacy.ps1 does a better job than anything I'd come up with.

Disable telemetry

fix10.isleaked.com suggests:

sc delete DiagTrack
sc delete dmwappushservice
echo "" > C:\ProgramData\Microsoft\Diagnosis\ETLLogs\AutoLogger\AutoLogger-Diagtrack-Listener.etl
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f

I would rather disable the services.

Add Set-Privacy to the PowerShell Gallery

Have you considered adding Set-Privacy.ps1 to the PowerShell Gallery?

It would make installing the script as easy as:

Install-Script Set-Privacy

Then the user doesn't have to worry about being in the right directory, or unblocking zip files or anything like that.

I've never tried adding a script to the gallery, but the instructions look pretty easy. However, I have recently published a PowerShell module on there, so I'd be happy to answer any questions I can.

Doesn't work with Win 10 v1803

It makes changes in the registry under those keys, but most of the privacy setting are not affected.
After manually setting the privacy settings to off I checked the registry and 3 had switched from allow to deny.

2297E4E2-.... -- Device access
52079E78-.... -- App Notifications
A8804298-.... -- Radio

They have also added "Privacy access" buttons that allow you to turn off most of the privacy setting for everyone on the computer from the looks of it.

Does anyone know where the registry keys for the "access" buttons are, or the other parts of the privacy settings?

Edit: Spelling

Group Policy

Is it possible to configure a GP within the script?
I'm thinking about disabling the Windows Automatic Update and OneDrive use on win 10 pro/enterprise.

Language depending line

In line 451 the keyword BUILTIN is useed, but it is depending on the Language of Windows 10.

Line 451:
$rule = New-Object System.Security.AccessControl.RegistryAccessRule ("BUILTIN$adminGroupName","FullControl","Allow")

this shuld work :
$rule = New-Object System.Security.AccessControl.RegistryAccessRule ("$env:hostname$adminGroupName","FullControl","Allow")

Wifi Sense

Have you tested, that the Wifi Sense feature will be disabled?
I also engaged a little about this feature but came to a different resolution.
In my case setting the key
HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features<user-sid>\FeatureStates to 828 disabled the Wifi Sense at least in the Settings UI of Win10 (Settings->Network->Wifi->Configure Wifi Settings).
I also found this post on stackoverflow

Any way, many thanks for sharing your knowledge.

'Attempted to perform an unauthorized operation'

When using:

 .\Set-Privacy.ps1 -Strong -Admin

I get:

 HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection\AllowTelemetry changed to 0
 Set-ItemProperty : Attempted to perform an unauthorized operation.
 At E:\news\Set-Privacy.ps1:157 char:13
 +             Set-ItemProperty -Path $Path -Name $Name -Value $value
 +             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : PermissionDenied: (SpyNetReporting:String) [Set-ItemProperty], UnauthorizedAccessExcepti
    on
     + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.SetItemPropertyCommand

 HKLM:\SOFTWARE\Microsoft\Windows Defender\Spynet\SpyNetReporting changed to 0

this may be due to tightened security on a registry key.
This happened in 10.0.10586.218

conversion and identity error

The script sometimes gets errors on a German Windows 10 1607 DE.
This might be related to the $adminGroupName variable wich gets two values on a german system (Administratoren and Administratos).

PS-Output:
Der Wert "System.Object[]" vom Typ "System.Object[]" kann nicht in den Typ "System.Security.Principal.NTAccount"
konvertiert werden.
In Set-Privacy.ps1:523 Zeichen:9

  •     $acl.SetOwner([System.Security.Principal.NTAccount]$adminGrou ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [], RuntimeException
    • FullyQualifiedErrorId : ConvertToFinalInvalidCastException

Ausnahme beim Aufrufen von "SetAccessRule" mit 1 Argument(en): "Manche oder alle Identitätsverweise konnten nicht
übersetzt werden."
In Set-Privacy.ps1:527 Zeichen:9

  •     $acl.SetAccessRule($rule)
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : IdentityNotMappedException

HKLM:\SOFTWARE\Microsoft\Windows Defender\Spynet\SubmitSamplesConsent already set to 0
Ausnahme beim Aufrufen von "RemoveAccessRule" mit 1 Argument(en): "Manche oder alle Identitätsverweise konnten nicht
übersetzt werden."
In Set-Privacy.ps1:542 Zeichen:9

  •     $acl.RemoveAccessRule($rule) | Out-Null
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : IdentityNotMappedException

Best wishes,
Markus

Change privacy settings in Edge

More Actions > Settings > View advanced settings. Enable Do Not Track requests and disable search suggestions, page prediction and SmartScreen filter. Make sure that Cortana is switched off too.

I'm a total beginner (sorry in advance)

Hello everyone! If anyone could help me I would greatly appreciate it! So basically I have downloaded the code and unzipped it to my Desktop page. I want to be able to edit the code to change the privacy settings as it's something I have to regularly do at work and it's quite a tedious task. I'm trying to work the code but I have no clue how to work the programme.

If I want to change the settings in this programme do I have to change the $value to which ever setting I want e.g $disable ?

So far I have tried "Function ImproveTyping([int]$value)" and then changing the "$value" to "$disable" so that it will turn off that setting. However when I run the programme which I do in the unzipped folder that I unzipped and click "run with powershell" on the application. None of the settings that I have changed the $value seem to change at all. I have tried saving the programme and then refreshing the folder to get it to accept the new commands however I cannot get it to work in my favour.

Am I using the programme correctly by changing the $value commands via "Windows Powershell ISE"? I'm not sure how to work this sort of programme as I'm a total beginner. Any help would be much appreciated.

Thank You
-N00bProgrammer123

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.