How do I convince powershell (when run through task scheduler on windows 7) to find my network drive?
I have a simple powershell script on windows 7 that doesn't work properly. (this is not an issue on XP) get-psdrive When I run it directly, I get Name Used (GB) Free (GB) Provider Root ---- --------- --------- -------- ---- A FileSystem A:\ Alias Alias C 12.30 11.60 FileSystem C:\ cert Certificate \ D FileSystem D:\ Env Environment Function Function HKCU Registry HKEY_CURRENT_USER HKLM Registry HKEY_LOCAL_MACHINE **Q 1486.63 289.41 FileSystem Q:\** Variable Variable WSMan WSMan When I run this through task scheduler, I get Name Used (GB) Free (GB) Provider Root ---- --------- --------- -------- ---- A FileSystem A:\ Alias Alias C 12.30 11.60 FileSystem C:\ cert Certificate \ D FileSystem D:\ Env Environment Function Function HKCU Registry HKEY_CURRENT_USER HKLM Registry HKEY_LOCAL_MACHINE Variable Variable WSMan WSMan Note that I'm missing my Q: drive. If there's any way to get this resolved, I'll be able to copy files there....
October 29th, 2010 5:01pm

Ugh... I've been digging over the weekend and found a lousy work-around. using "net use h: \\server\mount /user:domain/credentials password" in my script will get it to work. Seriously? That's all I've got? It works, but now I've got username credentials in my script... Yes, I could use .net encryption, but really...
Free Windows Admin Tool Kit Click here and download it now
November 1st, 2010 12:21pm

Hi, Thanks for the post! Glad to hear that you find a workaround, I recommend you also ask this question in Script Forum. It’s more professional for your question. Regards, MiyaThis posting is provided "AS IS" with no warranties, and confers no rights. | Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
November 4th, 2010 5:05am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics