Powershell on Startup + Azure Storage
-
Hi Team
So I have a client using Azure File storage. In short, they have a mapped drive (S:) which is a mapped to a small Azure file storage repository.Annoyingly when the computer is rebooted (sometimes) or goes to sleep, when they log in, the S drive has disappeared (despite persist in the script). Can anyone let me know either a) how to keep the mapped drive there always and forever, or b) how to set the powershell script to run on login automatically (as an admin). If you need any more details, please let me know. thanks, J
-
Task schedule r can do this without issue.
-
@dustinb3403 said in Powershell on Startup + Azure Storage:
Task schedule r can do this without issue.
Yeah, that seems like the easiest way
-
So I get to this stage:
Where should I browse to? I can find the PS application but how do I point to this, then get it to run the script within? forgive me, limited knowledge on PS scripting. -
For the arguments put this and then the path to your .ps1 script.
-ExecutionPolicy Bypass <path to script.ps1>
-
I tried this. Powershell launched at startup but the script didnt run. What I noticed is that if i run the script with powershell, it doesnt work. However if I open with Powershell and execute the script, it works!
-
@joel said in Powershell on Startup + Azure Storage:
I tried this. Powershell launched at startup but the script didnt run. What I noticed is that if i run the script with powershell, it doesnt work. However if I open with Powershell and execute the script, it works!
PowerShell is so unnecessarily complicated.
-
@joel said in Powershell on Startup + Azure Storage:
I tried this. Powershell launched at startup but the script didnt run. What I noticed is that if i run the script with powershell, it doesnt work. However if I open with Powershell and execute the script, it works!
You cannot map a dive a startup, that requires a user session.