Hello,
I am creating a simple PowerShell v3.0 local logon script for all who logon that is running on W2K8 R2 SP1 server to map a persistent "K:" drive to a remote AD domain W2K8 R2 SP1 file server (no AD domain trust between the server mapping from and file server mapping to). The PS v3.0 script will map but you have to manually enter a password. I want to get it where the PS script can store the username and password so no user intervention is necessary to persistently map this network drive. Here is the simple PS v3.0 script which works but requires manually entering a password:
New-PSDrive -name "K" -PSProvider FileSystem -Root \\FileServer1\FileShare1\DeptFolder1 -Persist -Credential DOMAIN\%serviceaccountname% -Password %Password%
I don't know if there is a "-Password" parameter so if any PS expert can lead a novice like me to a script that can store credentials, I will be most grateful.
Matt