Scripting training

shochanshochan Techno DancerARPosts: 761Member ■■■■□□□□□□
so, I really don't have any background in programming...only a few Basic/Visual Basic courses from my AAS degree (yeah, back in 90's).

I would really like to learn some scripting languages easily (Powershell, Python, Perl, etc)...I have only dabbled with batch files/logon scripts.

Do you have a recommended authors/vlogs/training site, etc? 

What I do have is the 30min lunches for Powershell already, however, I guess I am looking for something that has tutorials where you actually build a script from scratch from a scenario, per se.  That is what I am really looking for, but not for sure if anyone has put that out there on the interwebs.  I also have a few Python courses in my Udemy account too.

In the meantime, I will finish up the 30min of lunches & Udemy courses and see if I have a better understanding. 

BUT if anyone else out here has suggestions/comments, please post!

Cheers & Hi5!
2019 goals -> CEH (Feb), RHCSA (Dec)


"It's not good when it's done, it's done when it's good" ~ Danny Carey
Tagged:

Comments

  • OmegaGatorOmegaGator Posts: 1Registered Users ■■□□□□□□□□
    I learned Python a while ago and I'm glad I did. I use it almost every day at work, or at least what I created. I just started trying to script parts of my job. I started with hxxps://automatetheboringstuff.com/ its a great FREE book. I'd say find what takes you the most time at work and try to start trimming it down.

    Best of luck!
  • LonerVampLonerVamp Senior Member Posts: 228Member ■■■□□□□□□□
    I learned PowerShell doing the scripting games challenges from Microsoft years ago. They gave you a scenario, likely some files to download, and you would script the solution, send it in, and get it scored (passed, basically). I don't think they do these games anymore, but the challenges are still up. They make for great microgoals to pursue, with each idea you have to solve it, a chance to research, write, and troubleshoot the script rather than some tutorial just writing it for you.

    Security Engineer/Analyst/Geek, Red & Blue Teams
    OSCP, GCFA, CISSP, OSWP, CCNA Cyber Ops, Sec+
    2019 goals: GWAPT, Linux+, SLAE (possible: SEC573, CCSP, Splunk F&PU)
  • QordQord Senior Member Posts: 627Member ■■■■□□□□□□
    edited January 8
    One of the best powershell resources I've found so far:
    https://mva.microsoft.com/en-US/training-courses/getting-started-with-microsoft-powershell-8276 

    Not quite what you were asking for (no build script from scratch), but it's definitely worth a watch. 
  • InfoSec_ScottInfoSec_Scott Posts: 2Mod Mod
    Do you have a recommended authors/vlogs/training site, etc?  
    Hi, 
    My entire job is automation this means that I am writing automation scripts all the time. I use Powershell, Bash and Python 3. I find that python is my favorite language to work with but bash and PowerShell scripts are more portable in their respective environments. By far the best way to learn is to pick something that you want to build and try building it. If you need inspiration https://automatetheboringstuff.com/

    If you have a project in mind feel free to ask questions. I will do my best to pay attention to this forum :) 
  • rsxwithslicksrsxwithslicks Member Posts: 53Member ■■■□□□□□□□

    I bought ‘Learn PowerShell in a Month of Lunches’ but it didn't help me as much as I hoped. What really helped me was reading/looking at other scripts and trying to break down what the script is trying to do. Then I found easy things that took too much time and wrote PS scripts in PowerShell ISE. I would recommend using PowerShell ISE as it does have an auto-fill that will show you plausible options as you begin to type. As I learned more, I would go back and alter the scripts to add in new things I thought of or learned.


    Example:
    Googled how to get list of groups a user is in... [Get-ADPrincipalGroupMembership -Identity 'User']

    Wait a second… It works in AD server but not at my desk. Hmm… Google tells me that I need to install the Active Directory module in order for it to work on my computer. Follow steps and run again…

    Success! However I’m not liking the way the data is displayed back to me… Too much scrolling…

    Oh! There’s a way to format the information… [Get-ADPrincipalGroupMembership -Identity 'User' | FT]

    Now how do I move a user into a different OU...? [Get-ADUser ‘User’ | Move-ADObject –TargetPath ‘OU=”OU Name”,DC=Fake,DC=com’]

    So I can disable a user account… [Disable-ADAccount –Identity ‘User’]

    Add the above together and I have the beginning of what I use for my employee termination script…

    Now instead of changing the User multiple times in each section prior to running, I learned about variables and added $User to my script.

    From there I learned how to use Visual Basic to create an InputBox that would open up and I can just now type the user’s name in the box instead of editing the script every single time.

    And so forth…

  • InfoSec_ScottInfoSec_Scott Posts: 2Mod Mod
    For PowerShell GUIs, I use PowerShell Studio. It also the ability to make executable or installable from your scripts. 
Sign In or Register to comment.