ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Powershell on Startup + Azure Storage

    IT Discussion
    4
    8
    623
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JoelJ
      Joel
      last edited by

      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

      1 Reply Last reply Reply Quote 1
      • DustinB3403D
        DustinB3403
        last edited by

        Task schedule r can do this without issue.

        scottalanmillerS 1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller @DustinB3403
          last edited by

          @dustinb3403 said in Powershell on Startup + Azure Storage:

          Task schedule r can do this without issue.

          Yeah, that seems like the easiest way

          1 Reply Last reply Reply Quote 0
          • JoelJ
            Joel
            last edited by

            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.

            0_1520454453305_Capture.JPG

            1 Reply Last reply Reply Quote 0
            • DustinB3403D
              DustinB3403
              last edited by

              0_1520454763718_mmc_2018-03-07_15-32-35.png

              For the arguments put this and then the path to your .ps1 script.

              -ExecutionPolicy Bypass <path to script.ps1>

              1 Reply Last reply Reply Quote 0
              • JoelJ
                Joel
                last edited by

                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!

                scottalanmillerS JaredBuschJ 2 Replies Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @Joel
                  last edited by

                  @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. 😞

                  1 Reply Last reply Reply Quote 1
                  • JaredBuschJ
                    JaredBusch @Joel
                    last edited by

                    @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.

                    1 Reply Last reply Reply Quote 3
                    • 1 / 1
                    • First post
                      Last post