At work I LARP as a server administrator, because when I started in my job I inherited a large collection of videotape, some of which was junk, some of which was important historical content. So about a decade ago I got inspired to make a database of all the tapes, and then when it turned into the Future all the files in our big folder of digital video files. I got the IT dept at the time to give me a web server, and learned just enough PHP, SQL and Javascript to build a front end for the database and host it on a server on our network.
So now we have a useful, searchable website that is the front end for a database of all our assets, and as long as people enter the right details you can find the assets and everything is good. But you can see the problem. >>> "As long as people enter the right details"<<<.
So I wrote a powershell script that scans the folders and indexes every relevant file and folder, skipping a lot of guff that ends up in there because Adobe. It also takes into account that sometimes we store video as image sequences, meaning there might be literally hundreds of thousands of sequential files in a folder, so it summarises them as "file_000.exr .. and 12340 more". It's been iterated upon so it suits our indexing needs and works well.
Now while our IT dept was like "Oh you want admin access on an in-house server to do your thing, no worries" I could add a scheduled job to run my update script at 2 oclock on a Sunday morning and keep everything up-to-date. But new IT took over, and immediately started freaking out about the whole thing,, and so now I have to log on and manually do the scan, which i never remember to do.
===THE ACTUAL QUESTION===
- I need to run an index of a windows network share that I as a network user have access to, but the IIS web service user doesn't (I might not have explained that well, basically if I try to index the folder using a PHP script from a remote computer I get access denied errors, but if I run the script locally on the server it works fine).
-I have a custom pwsh script that does the indexing just fine (and I could re-write it as PHP).
- I can set up the scan as a scheduled task, but I don't have the ability to run it unless logged on. If I try to set it up to run with my network account whether I'm logged in or not I get an error saying I need "Log on as batch job rights". If I try to set it up as the user that has admin rights for the server (which I manage through passwordstate) I don't have a password to authorise it.
- Is there a way to do this without having to ask IT for more permissions?
- if there isn't, what should I be asking for?
#IIS #PHP #IDontReallyKnowWhatImDoing #FediTechSupport





