Test if OneDrive is installed regardless of version, even if the user has never logged into it?

Without getting into the weeds, my environment has been inconsistently built and maintained, which includes a mix of Win7 and Win10, Office 2007 to 2019, some are O365, some have OneDrive, some do not, and some have OneDrive on their machine but never signed into it. I need a way to find who all has OneDrive installed as we get ready to migrate to a better setup.

Because of the mish-mash of software I am having a hard time finding a good solution to “how to test if OneDrive is installed” through things like regkeys. About the best I’ve found (read: atleast works on my machine) is this:

test-path "C:Users$env:usernameAppDataLocalMicrosoftOneDrive" 

This works on my Win10 machine with O365 and I’m about 90% sure it will work on all machines, but I was hoping someone could help with that last 10%

submitted by /u/WantDebianThanks
[link] [comments]

Leave a Reply