I’ve set up a backup script in WSL to back up my Windows 11 Pro desktop to an external drive and Google Cloud Storage. However, WSL sees open Windows files as locked, causing backup issues. I think a good solution would be to create a non-persistent shadow copy of drive C:, run the backup from there, and discard the shadow copy afterward (ideally automatically after a reboot).
What’s the simplest way to create a temporary, non-persistent shadow copy of C: using PowerShell, without installing any additional software?
The command diskshadow seems promising, but I can't seem to be able to execute it on my installation.