Sep 24 2021 06:55 AM
We have existing policies that we'd like to replicate as Powershell commands since we are migrating to Azure AD (not premium and don't have Intune) so we'll lose the ability of applying these policies.
Has anyone setup these with Powershell (I am such a newbie with PS):
1. Enable Storage Sense
2. Set each OneDrive sync retention to 14 days.
It's currently setup in a policy so any existing or new OneDrive library they sync automatically gets set to 14 days.
We use ConnectWise Automate so we should be able to push these out to PCs with a script, if I can figure out how the powershell command looks.
Sep 25 2021 08:59 PM
Here are the registry locations for the storage sense policy settings. You can use PowerShell to set these like you would other registry settings.
Be aware, you can also configure these with Intune. I'd do that instead of PowerShell if you're able to.
Sep 27 2021 06:58 AM - edited Sep 27 2021 07:00 AM
@Mike Crowley I seem to be missing the StorageSense folder from HKLM location for the dehydration settings we need. I don't have it in the HKCU either.