I'm talking about job scripts, especially pre-freeze and post-thaw, since those run on the servers being backed up. Currently, I'm wrapping all of my PS scripts around a batch file, but that's fairly annoying, since I have to deploy the 'real' script via some other method and all the .bat file does it run powershell. I'm sure I'm not the first and will not be the last person to request this.
Also, the Script fields don't seem to operate with parameters, which means very often I have to deploy a different .bat file to each server I want to use my scripts with to add what could easily be a parameter variable.
Native copying and running of PS scripts, or remotely running PS through WSMan would be amazing. Also, adding something simple like an Parameters field alone would be a big step in the right direction for all kinds of scripts, not only PS.
Example:
Script: ..\Script.ps1
Parameters: -param "string"
I don't think that's asking too much, myself, although having to troubleshoot remote Powershell sessions would be bad if having to deal with someone who doesn't know how to use WSMan. Plus side? Again very easy to log WSMan errors.
Even the current method of copying to a temp folder and running a PS script would be so great! Basically, I love the convenience and better security of not having plain text passwords in the scripts or having to do some API call to Secret Server for passwords.
Other benefits of using Powershell? It would be really easy to capture the Error, Warning, and Regular text Output streams and log those, making log analysis 100 times easier for everyone. Currently, we get a cmd process return code and nothing more from a batch file that wraps a PS script... Not ideal, in my opinion.
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Aug 30, 2017 6:04 pm
- Full Name: K Berger
- Contact:
Who is online
Users browsing this forum: No registered users and 107 guests