I was wondering if someone could help explain what the below powershell script is doing. It was inherited and whatever its function isn't working correctly, i was hoping to understand a little better to help troubleshoot
where would i look to see if it's running as a service?
Dustin Saunders
services.msc on any of your main servers would be a good place to check. If it's not running as a service then it may be firing off as a scheduled task. If you recently rolled passwords and it's not running, could be the task or service needs the updated password.
Leadtheway
ASKER
yeah i have another script that is scheduled that cleansout the backup directory this script copies to, but i don't see one for this script, nor do i see it in services...not sure how it runs then, but it's running because its moving to bakdir, just not copying to the dstdir
Is this still a valid location?
$dstDir = "\\tc00afsv02\c$\Shares\zvol2$\OpexTest\Unprocessed"
Leadtheway
ASKER
yes
Dustin Saunders
You may want to then open the script in powershell ISE and run it manually. If there are any errors, you'll get red text output and it might shed some light as to where your problem is coming from.
It won't be running as a service but a scheduled task
Dustin Saunders
It's fairly popular for people to load powershell tasks as a service, it's actually very easy to create them using PowerGUI. It's typically preferred to run like that because you can set up your monitoring to check the service status and ensure it's not down.
Leadtheway
ASKER
Just a follow up, after doing some digging through event log, it was actually launched and left running constantly checking for that oxi file, it was launched under the profile of the guy I inherited from, thus when his account was disabled, that profile no longer had access to that path.. I think we have it sorted, much thanks