For context, I need to check if a network drive exists. If it exists then no action, if it doesn’t exist need to map it
The problem, Powershell Test-Path is returning true but when I try to delete the path it says it does not exist
I think there may be another user that has it mapped? Not sure how I can check if the current user has it mapped
> net use /delete "\serverMyShare"
The network connection could not be found.
> Test-Path "\serverMyShare"
True
>[System.IO.Directory]::Exists('\serverMyShare')
True
>net use
No results