I like OneDrive. It allows me to keep my data secure and always synchronized. If things go wrong, I can always get it back. I use it for almost everything. Even for my PowerShell projects, which are committed to GitHub, so in theory, I shouldn't need that. But every once in a while, I make some stupid mistake and delete a file that has yet not been committed to GitHub, and that's where the OneDrive comes in handy. Quick restore, and we're back. Unfortunately, sometimes things aren't as I would expect them to work. For example, let's have a look at this nice list of markdown files that are documentation for my module called GPOZaurr.
Every time I would like to delete that content or anything from PowerShell it would throw me an error
While I could understand the error if it was a file that is stored in the cloud, it's actually fully available on my drive, just synchronized to OneDrive. It wasn't always like that. It started happening a few months ago, so most likely some update caused it – or maybe it's the great Files On-Demand feature causing this issue. I don't know and I don't even want to go deep and test every possible combination where this happens. All I know is this impacts my scripts, as anything that is supposed to get deleted automatically and, for some reason, is stored on OneDrive gets hit with this error.