-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapped network drive not available after script restarts Plex #26
Comments
Please check #4 |
Thank you, read through that one. And I have tested running the command manually.
Run this in Powershell with Administrator, got the same issue as the script. Both cases, the PMS shows running under current user in task manager, the only difference is the UAC Virtualization column, first one said "Not allowed", second says "Disabled". Not sure if this is related or not though. |
The problem is that the script needs to run as Administrator; otherwise, it will not have permissions to stop and start services and processes. If you have any ideas, throw them at me and I'll give them a try. |
Okay, give this a try. Change line 1808 from:
to
See if this helps. |
@yangqi Any luck? |
Hi first of all thanks for the script. I have the same problem with network shares and came here. I created a test Powershell with various ways to run the Plex Media Server.exe and none of these work (I comment out all of them here but I would uncomment to try different approaches): The user/pass for my server is plex\plex $securePassword = ConvertTo-SecureString $password -AsPlainText -Force This has me stumped, but it believe it has to do with Administrator permissions for network folders, however I do verify in task manager that the services are running under Plex user correctly so ??? Can you add a reboot option... my Windows Plex server is set to auto login so this would be a workaround... I suppose I can just add this in code myself too for now - Restart-Computer |
@Doughboy68: Have you tried my suggestion for @yangqi above? I have been testing it daily for the last week, and it seems to be working for me (I am also using an option to log off all currently logged users). It could be a coincidence, though, since this particular problem comes and goes. Also, it has nothing to do with Plex per se, and it's not an issue of PowerShell, I think. It does not happen when you run the script interactively and only occurs when you run it as a scheduled task. So it looks like some bug in Windows Scheduled Tasks app. Anyway, give my suggestion a try and let me know. |
I added a reboot option so this is the workaround I am using for now. If anyone figures out why scheduled tasks mess up remote share connection, please let me know. |
Hi Alek, Have recently found your script and after some trouble figuring it out (total noob). I've finally got it work and it's awesome! I have however run into this old issue though #26. I was just wondering if you figured out anything additional since Aug 2020? I've changed line 2331/2332, and tried both of these below as you suggested and still get the issue unfortunately.
Was wondering if you've come up with anything since then? Just a bit iffy to run it as a scheduled task at the moment as I'd have to reboot the application everytime. |
Hi K-Bong. No, haven't figured it out. I suspect it's an issue with Windows Scheduled tasks or something related to the tasking subsystem (since it only happens when the script runs as a scheduled task). I just have mine configured to reboot with autologin. |
Thanks for responding. I do get the issue when running the script directly from PowerShell, and as a scheduled task by the way. But it's no biggie, I might just try what you mentioned or just run the script manully, cheers! |
Oh, in my observation, it was always a Scheduled Tasks issue. Are you saying that even when you run it manually in PowerShell, you get the same problem? That would be even more weird. |
Yep. I wanted to make sure the script worked first before running the scheduled task. I would see the behaviour throughout the whole thing, whether I ran it from powershell or through task scheduler. |
That's bizarre. I am wondering if when you run it from PowerShell, the profile by default gets connected to a share with no permissions. I wish I know how to address this one. |
Yeah. Otherwise it works well, so appreciated. Sure you'll keep us updated if you do figure something out. |
All my libraries are saved on mapped network drives on NAS. Every time the script finishes, all my libraries become unavailable, and I could not see those drives from Plex. Have to restart Plex manually for them to work.
The text was updated successfully, but these errors were encountered: