Link to home
Start Free TrialLog in
Avatar of ntsabman
ntsabman

asked on

PowerShell Commande to do a subst

i need a commande to be able to do the following in PowerShell

Subst w: p:\w

but i need it to vérify if the letter is allready in use by a network share and if so unlink it firts
SOLUTION
Avatar of Grasty86
Grasty86
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Right, when I was testing it I used T:, must have forgotten to switch that to W: before posting it.

Thanks for the correction Qlemo
Avatar of ntsabman
ntsabman

ASKER

The brut force one is more stable and did not fail in testing the firts one fail from time to time witch is weard.