Does a script imply Automation?
-
@travisdh1 said in Does a script imply Automation?:
Where did that question even bubble up from?
This
-
@travisdh1 said in Does a script imply Automation?:
Where did that question even bubble up from?
This is from a Teams Chat with the other three Service Desk / IT people ....
-
@gjacobse said in Does a script imply Automation?:
Simply thus
Does a script imply automation?
Define Automation.
In our world, Automation and Remote Control are often used interchangeably, when they are not the same. So it is important to understand what is meant by "automation".
We have written thousands of scripts over the years to do programmatic tasks for us, but only a handful are "automation".
-
@gjacobse said in Does a script imply Automation?:
This is from a Teams Chat with the other three Service Desk / IT people ....
https://i.imgur.com/5kaeSbl.pngI agree with this.
-
@gjacobse said in Does a script imply Automation?:
@travisdh1 said in Does a script imply Automation?:
Where did that question even bubble up from?
This is from a Teams Chat with the other three Service Desk / IT people ....
Right. A script can be used as a means to carry out the automation of a task or a set of tasks.
-
@obsolesce said in Does a script imply Automation?:
@gjacobse said in Does a script imply Automation?:
@travisdh1 said in Does a script imply Automation?:
Where did that question even bubble up from?
This is from a Teams Chat with the other three Service Desk / IT people ....
Right. A script can be used as a means to carry out the automation of a task or a set of tasks.
That is the sole point - a script to perform the automation(al) task of creating a new user, defining; First, last, email manager, address and with additional questions - needed security groups.
-
@gjacobse said in Does a script imply Automation?:
@obsolesce said in Does a script imply Automation?:
@gjacobse said in Does a script imply Automation?:
@travisdh1 said in Does a script imply Automation?:
Where did that question even bubble up from?
This is from a Teams Chat with the other three Service Desk / IT people ....
Right. A script can be used as a means to carry out the automation of a task or a set of tasks.
That is the sole point - a script to perform the automation(al) task of creating a new user, defining; First, last, email manager, address and with additional questions - needed security groups.
That is not automation unless is is simply doing it without your input.
Also.
That is automation of your many manual steps into one manual step
-
@gjacobse said in Does a script imply Automation?:
Simply thus
Does a script imply automation?
Yes.
It implies some kind of automation.
The definition of a script:
-
@gjacobse said in Does a script imply Automation?:
Simply thus
Does a script imply automation?
No. Often a script is used as a tool to create automation, and usually one would write a script with the end goal of eventually automating something. However, just a script alone in a vacuum does not imply automation.
-
I'm going to try and demonstrate the difference between a script and automation in a super simple way. This scenario can certainly be expounded on, but this is a super simple way to show the difference between a script and "automation" using the same script.
Here is a Script we have. It is just a script. There is no automation. This script does not run without our input. This script does not run if another event is not triggered. This script does not run on it's own.
The Script. We run MyDefrag.ps1 to start it. When it dies, it is dead.
# Sleep until 19:00 $a = Get-Date -Format HH:mm:ss $b = [datetime]"19:00:00" Start-Sleep (New-TimeSpan -Start $a -End $b).TotalSeconds # get volumes on local system $v = get-wmiobject win32_volume # Now get the C:\ volume $v1=$v | where {$_.name -eq "C:\"} # Perform a defrag analysis on the C: drive $dfa = $v1.DefragAnalysis().DefragAnalysis # Sleep for 24 hours Start-Sleep -Seconds 86400 # Run Optimize (Defrag) if File Fragmentation is more that 6% if ( $dfa.TotalPercentFragmentation -gt 6) { Optimize-Volume -DriveLetter C -Defrag }
Now we are going to make it "Automation".
Install NSSM so we can turn this script into a Windows service that starts at boot time with no human intervention whatsoever.Register the Script as a service with NSSM:
nssm install [serviceName] [PathandScriptName] [arguments]
Now our script starts when Windows boots and runs defrag every evening at 7:00pm if needed, without any human intervention.
-
Here is another daily occurrence in our business:
Customer 1 who does not understand automation:
"Hey friend, check out my new automated house! When I see my wife pull in, I press this button on this little keyfob and the garage door goes up, then I press this other button and the hall light by the back door turns on for 10 minutes."Customer 2 who does understand automation:
"Hey friend, check out my new automated house! There is a motion sensor at the end of our 700 foot driveway. When this motion sensor sees motion, it causes our driveway camera to take a picture of the car pulling in. Our Raspberry Pi does License Plate Recognition on that picture, and if it is my wife, it runs this set of commands: Turn on Driveway lighting, Open Garage Door, turn on Hall light, Play the chorus verse of “My Girl” by The Temptations on the SONOS system throughout the house, and sends my wife a sms saying "Welcome home! I've missed you!" All the while, I never even woke up from napping in my Lay-Z-Boy!" -
@jasgot said in Does a script imply Automation?:
I'm going to try and demonstrate the difference between a script and automation in a super simple way. This scenario can certainly be expounded on, but this is a super simple way to show the difference between a script and "automation" using the same script.
Here is a Script we have. It is just a script. There is no automation. This script does not run without our input. This script does not run if another event is not triggered. This script does not run on it's own.
The Script. We run MyDefrag.ps1 to start it. When it dies, it is dead.
# Sleep until 19:00 $a = Get-Date -Format HH:mm:ss $b = [datetime]"19:00:00" Start-Sleep (New-TimeSpan -Start $a -End $b).TotalSeconds # get volumes on local system $v = get-wmiobject win32_volume # Now get the C:\ volume $v1=$v | where {$_.name -eq "C:\"} # Perform a defrag analysis on the C: drive $dfa = $v1.DefragAnalysis().DefragAnalysis # Sleep for 24 hours Start-Sleep -Seconds 86400 # Run Optimize (Defrag) if File Fragmentation is more that 6% if ( $dfa.TotalPercentFragmentation -gt 6) { Optimize-Volume -DriveLetter C -Defrag }
Now we are going to make it "Automation".
Install NSSM so we can turn this script into a Windows service that starts at boot time with no human intervention whatsoever.Register the Script as a service with NSSM:
nssm install [serviceName] [PathandScriptName] [arguments]
Now our script starts when Windows boots and runs defrag every evening at 7:00pm if needed, without any human intervention.
Daily Defrags
-
@eddiejennings said in Does a script imply Automation?:
@gjacobse said in Does a script imply Automation?:
Simply thus
Does a script imply automation?
No. Often a script is used as a tool to create automation, and usually one would write a script with the end goal of eventually automating something. However, just a script alone in a vacuum does not imply automation.
That's not really true because automation is not just IT automation like DevOps.
Automation comes from ancient Greek and means "acting on it's own will".So everything that is "acting on it's own will" is automated. If you start an install script, it will do things on it's own will. That is automation. If you use Ansible (a bunch of scripts) to do something, it's also automation.
Neither of those are fully automated because they will not initiate the process themselves and also requires some manual input.
In contrast things like large modern manufacturing plants are often fully automated and will run by themselves. However operators are needed to make decision and adjust the process so the end result is satisfactory. The ones that make the programs for a factory are called automation engineers.
-
@pete-s said in Does a script imply Automation?:
@eddiejennings said in Does a script imply Automation?:
@gjacobse said in Does a script imply Automation?:
Simply thus
Does a script imply automation?
No. Often a script is used as a tool to create automation, and usually one would write a script with the end goal of eventually automating something. However, just a script alone in a vacuum does not imply automation.
That's not really true because automation is not just IT automation like DevOps.
Automation comes from ancient Greek and means "acting on it's own will".So everything that is "acting on it's own will" is automated. If you start an install script, it will do things on it's own will. That is automation. If you use Ansible (a bunch of scripts) to do something, it's also automation.
Neither of those are fully automated because they will not initiate the process themselves and also requires some manual input.
In contrast things like large modern manufacturing plants are often fully automated and will run by themselves. However operators are needed to make decision and adjust the process so the end result is satisfactory. The ones that make the programs for a factory are called automation engineers.
I feel like this is splitting hairs way too finely. I don't think we can use that definition here.
Opening a browser and going to google.com would then be automation because I don't manually send the tcp request and then send an acknowledgement. I don't manually search the cache for data.
Same with any task on a computer. If we use that definition the only thing that's not automated is manually changing magnetic polarization on the platter by hand.
I believe there's a point where we can say things are automated or not based on what the script/task is.
-
@stacksofplates said in Does a script imply Automation?:
@pete-s said in Does a script imply Automation?:
@eddiejennings said in Does a script imply Automation?:
@gjacobse said in Does a script imply Automation?:
Simply thus
Does a script imply automation?
No. Often a script is used as a tool to create automation, and usually one would write a script with the end goal of eventually automating something. However, just a script alone in a vacuum does not imply automation.
That's not really true because automation is not just IT automation like DevOps.
Automation comes from ancient Greek and means "acting on it's own will".So everything that is "acting on it's own will" is automated. If you start an install script, it will do things on it's own will. That is automation. If you use Ansible (a bunch of scripts) to do something, it's also automation.
Neither of those are fully automated because they will not initiate the process themselves and also requires some manual input.
In contrast things like large modern manufacturing plants are often fully automated and will run by themselves. However operators are needed to make decision and adjust the process so the end result is satisfactory. The ones that make the programs for a factory are called automation engineers.
I feel like this is splitting hairs way too finely. I don't think we can use that definition here.
Opening a browser and going to google.com would then be automation because I don't manually send the tcp request and then send an acknowledgement. I don't manually search the cache for data.
Same with any task on a computer. If we use that definition the only thing that's not automated is manually changing magnetic polarization on the platter by hand.
I believe there's a point where we can say things are automated or not based on what the script/task is.
I think what you are referring to is the fact that there are different degrees of automation. Fully automated would be completely automated and making it's own decision without any form of human intervention.
But it's also the control of the operation and not the operation itself that will determine if it's automated. For instance a motor in a car runs by itself. But that doesn't make the car automated. Because the control of the car is not automated.
A fully automated car would drive itself without human intervention.
I don't think it's hairsplitting, it's just that IT automation doesn't have the same degree of maturity that some other field of automation have.
PS. Just the fact that people are talking about automation is a sign that the IT sector has a long way to go here. In automation of manufacturing nobody talks about automation anymore because it's a given. Has it's own budget and everything for every project.
-
@gjacobse said in Does a script imply Automation?:
Simply thus
Does a script imply automation?
No. Automation means doing a task for you. A script doesn't necessarily do anything for you.
-
@scottalanmiller said in Does a script imply Automation?:
@gjacobse said in Does a script imply Automation?:
Simply thus
Does a script imply automation?
No. Automation means doing a task for you. A script doesn't necessarily do anything for you.
I disagree here, in that a script written to replace the human process is automating the humans work flow. Just because the human kicks that process off doesn't mean that something hasn't been automated.
As @Pete-S said there are different levels of automation to consider...
-
@pete-s said in Does a script imply Automation?:
For instance a motor in a car runs by itself. But that doesn't make the car automated. Because the control of the car is not automated
Except that is automated compared to where it initially started. It's very automated in the sense that I don't have to get out and crank start my car or fill it with oil after every trip because it's assumed my oil will just leak out of my engine like they did when they first arrived.
You're proving my point. Automation changes over time. What we count as automated today will just be something we take for granted tomorrow. Which is why I used the example of lower level concepts. Those used to be manual things, and are now "automated" because we don't even think about them. But we don't really call that automation.
A script that echoes "hello world" is not automation but is a script.
In my mind for it to count as automation, the work the script does has to be less than equal to the amount of work it would take to do the task manually (with the caveat that the work is useful). This would incorporate tying larger initiatives together.
And we are back to what most of the discussions are on this site, it's opinion. The person talking to Gene clearly didn't think whatever the script was counted as automation. He's fully in his right to think that because a lot will agree with him.
I'm more interested to know what the script did or is going to do and we could determine whether it should be counted as automation.
-
@stacksofplates said in Does a script imply Automation?:
I'm more interested to know what the script did or is going to do and we could determine whether it should be counted as automation.
Here is process one from when I started.
Enable Bitlocker and save to text file.
Have you ever done this via the GUI? Open Bitlocker Management, Turn ON Bitlocker, likely need to reboot for hardware check. Export Key to text file. Copy file to Network share.Now do this on several PCs back to back.
After the sixth or so time through I was over it. Having learned how to deal with Bitlocker from the command prompt - enter the script - which I would paste here if I hadn't left my thumb drives at the office.
In short it will;
- Map a network drive
- Turn on Bitlocker without hardware check
- Save key to text file with the file name of the computer name, saving to network share.
So with that, I don't have to do anything but run the batch file.
The biggest one they are fighting me on script wise is Onboarding - creating a user, assigning a O365 license, entering in the
REQUIRED
information for the EMR to work, setting the Manager, address, adding the needed Security groups for VPN, Teams, MFA, and so on. And of course, there is Offboarding that could be done as well... -
@gjacobse said in Does a script imply Automation?:
Here is process one from when I started.
...
Now do this on several PCs back to back.
After the sixth or so time through I was over it.
...Things like this are the driving force behind thousands of our scripts.
We have one that does about 4 man-hours of work all by itself. It's on a USB, and 100% of the info it needs in order to personalize a new PC is read from an onboarding database that includes the Service Tag assigned to the new employee (we only use Dell) in the info for each user.
That's about as close as a human triggered script can get to being called automation. (And it is triggered by plugging in the USB and powering on the PC)
In my opinion
Great discussion, it really shows how we have all come to interpret the same things differently!