I want to map a specific network drive based on the username used to log in for example; this is what I have so far:
$net = $(New-Object -ComObject WScript.Network) $net.MapNetworkDrive("y:", "\\wstation\c$\y",,"username","password")
But I would prefer not to pass the password in clear text or for it to be visible to users.
Logic:
If current user = bloggs
then "run the script"
else
do nothing
Any help with this would be great
Chris Golden