Three words: project based learning. This is how I learned Powershell and gained my tiny bit of Python knowledge (I will have more Python knowledge when I get more time to work with it).
Set a small project goal and work towards it. For example, make a Powershell script that dumps the members (their AD account names) of a Security Group to a csv file.
Its fine to Google it.
Try to find the most basic example though, and whatever example you find, go voer it word by word until you understand what it is doing. Sometimes it seems whatever you want to do with Powershell is too big of a project or how would you do it (that's how I felt at first). Break it down into the smallest pieces as possible, and build the pieces. Then put all the pieces together.
For example, you get a request to find all of the members of a given security group, whose accounts are in the UTQ/contractors OU, and whoses accounts are enabled.
At this point it helps to write things down on paper, do a big of brainstorm design with ideas of how to get to the objective.
Continuing with the example, the first piece I would do is:
1. Find all the members of sg-utq-test
It may take a bit of time and Googling to determine how to do this, but this data is required before you can move on.
2. Powershell has an ISE (integrated scripting environment) which you can enter code into then run it and see the results. I use it for design and find it very helpful.
(The ISE does not function the same way as running a powershell script and there can be weird issues but I only rarely run into that. Short version, use the ISE to learn).
Given you are running the ise as your standard AD account, the only thing it will allow from AD is read only anyway. The most likely thing to happen when first learning Powershell is your code won't work. And that's fine. Google the error message.
3. Once your code runs and outputs the members of the security group, figure out how to find the OU those AD accounts live in.
At this step the only thing to look for is "Powershell determine the OU of an AD user".
4. Enter in the code to determine the OU of the AD users into the ISE below the other code you entered for step one.
One thing I do near the top of my scripts is
# Helpful links:
As I am researching how to perform various scripting things, I put those helpful links into the script. # is the comment start line character in Powershell
so nothing following # gets ran. Commenting your code helps a lot so you can revisit it later and see "Ok what was I doing here?" And also others can see what you were doing, or what you were trying to do etc. Thats also a design methodology. Use commenting to define what you need to do. Continuing with the above example:
# Write code to determine the members of sg-utq-test
<insert code here>
# Write code to dtermine the AD OU of these accounts which are members of the above sg
# Write code to filter the AD members so that you only get the ones who are members of UTQ/contractors OU
# Write code to determine which of these accounts are enabled
# Write out the data to a csv file
While you progress always back up your scripts to a certain Google Drive folder so when you have time to work on them they are easily accessiable.
Learn by doing
Start with a small project
Break it down into tiny parts
Solve each part with code, then tie it together.