86 lines
2.5 KiB
Text
86 lines
2.5 KiB
Text
{
|
|
"name" : "Disable OneDrive (GPO)",
|
|
"description" : "This module Remove Onedrive like GPO does and delete if.",
|
|
"actions" :
|
|
[
|
|
{
|
|
"_comment" : "Kill Onedrive process",
|
|
"action" : "KillProcess",
|
|
"name" : "onedrive"
|
|
},
|
|
{
|
|
"_comment" : "Kill explorer process",
|
|
"action" : "KillProcess",
|
|
"name" : "explorer"
|
|
},
|
|
{
|
|
"_comment" : "Execute OneDrive Uninstaller (x64 version)",
|
|
"action" : "ExecCommand",
|
|
"path" : "$env:systemroot\\SysWOW64\\OneDriveSetup.exe",
|
|
"arguments" : "/uninstall"
|
|
},
|
|
{
|
|
"_comment" : "Execute OneDrive Uninstaller (x86 version)",
|
|
"action" : "ExecCommand",
|
|
"path" : "$env:systemroot\\System32\\OneDriveSetup.exe",
|
|
"arguments" : "/uninstall"
|
|
},
|
|
{
|
|
"_comment" : "The 3 actions bellow delete Onedrive folders ",
|
|
"action" : "DelFile",
|
|
"path" : "$env:localappdata\\Microsoft\\OneDrive",
|
|
"recurse" : "True"
|
|
},
|
|
{
|
|
"action" : "DelFile",
|
|
"path" : "$env:programdata\\Microsoft OneDrive",
|
|
"recurse" : "True"
|
|
},
|
|
{
|
|
"action" : "DelFile",
|
|
"path" : "$env:systemdrive\\OneDriveTemp",
|
|
"recurse" : "True"
|
|
},
|
|
{
|
|
"_comment" : "Do not allow OneDrive for file storage",
|
|
"action" : "AddRegKey",
|
|
"value" : "1",
|
|
"key" : "DisableFileSyncNGSC",
|
|
"path" : "HKLM:\\Software\\Policies\\Microsoft\\Windows\\OneDrive"
|
|
},
|
|
{
|
|
"_comment" : "Disable OneDrive file sync with limited connection",
|
|
"action" : "AddRegKey",
|
|
"value" : "1",
|
|
"key" : "DisableMeteredNetworkFileSync",
|
|
"path" : "HKLM:\\Software\\Policies\\Microsoft\\Windows\\OneDrive"
|
|
},
|
|
{
|
|
"_comment" : "Disable save file to Onedrive",
|
|
"action" : "AddRegKey",
|
|
"value" : "1",
|
|
"key" : "DisableLibrariesDefaultSaveToOneDrive",
|
|
"path" : "HKLM:\\Software\\Policies\\Microsoft\\Windows\\OneDrive"
|
|
},
|
|
{
|
|
"_comment" : "Prevent Onedrive installation for new created user (non GPO key)",
|
|
"action" : "DelRegKey",
|
|
"key" : "OneDriveSetup",
|
|
"path" : "HKU:\\Default\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"
|
|
},
|
|
{
|
|
"_comment" : "Hide Onedrive icon from explorer",
|
|
"action" : "AddRegKey",
|
|
"value" : "0",
|
|
"key" : "System.IsPinnedToNameSpaceTree",
|
|
"path" : "HKCR:\\Wow6432Node\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
|
|
},
|
|
{
|
|
"_comment" : "Hide Onedrive icon from explorer (2)",
|
|
"action" : "AddRegKey",
|
|
"value" : "0",
|
|
"key" : "System.IsPinnedToNameSpaceTree",
|
|
"path" : "HKCR:\\CLSID\\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
|
|
}
|
|
]
|
|
}
|