Assistance with PowerShell Scripting - Windows Scheduled Tasks
I am trying to get PowerShell to run a Scheduled Task if it exists, or create a scheduled task if it doesn't. I have verified the locations of the files and that the computer names are online and reachable (I have one here at my desk as a test). The script looks like it runs, and I don't get any errors, but the task isn't created on the remote machine like it should be.
Did I miss something simple? Or is my code just wrong. I am still trying to learn PowerShell, so either scenario is very possible.
Open in new window
This gives me an error after I type in my credentials. I tried username@domain and domain\username formats. I also restarted the WinRM service on the remote machine.