Microsoft PowerShell ISE Demo and Random Scripts

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to my channel in this video i will show you some of my windows powershell scripts i acquired over the years i will be demonstrating this in the windows powershell ise which stands for integrated scripting environment in the ise you can run commands in a single windows based graphic user interface some of the benefits of using ise is tab completion syntax coloring selective execution and more the first one will print out the alphabet in lowercase there's two ways to execute this script one way is to click this green play button and which will run the script or click the f5 button and it will do the same and i will be doing both methods click the play button and down below is the output of the script which is the alphabet in lowercase we can do the same thing print the alphabet in uppercase and what's nice about this script is it puts the output onto the clipboard so if i go to a notepad and do a ctrl v to paste you can see the alphabet and uppercase you may be wondering how is this printed out let me go to the lower case again so you see the 97 through 122. those are char numbers so the 97 corresponds to the lower case a 98 will be lower case b and you can also do this in excel so if i type in 97 highlight the whole column do a fill series and i want to stop at 122. this prints 97 through 122 and then i'm gonna issue this function char so it says returns the character specified by the code number hit tab a1 and now it translates into lowercase if i hover over and click the lower right corner and double click it's going to send it down so you see 97 through 122 it's the a through z alphabet same thing goes to uppercase uppercase goes from 65 to 90. i'm gonna clear everything out 65. fill series to 90. char function a1 send it down a through z that's how it extracted the values you can also print the alphabet out in a grid view i'm going to press f5 on my keyboard and this is called the grid view which you can interact further you can add criteria and then you can do some filtering on i'm gonna say the as david x so it it's a serve as a filtering application let's do the same thing and print the upper case out in a grid view what's also neat about this one is see how i have it here on line 11 output grid view and i gave it the grid view a title so alphabet uppercase and then the count it counts how many objects are returned so 65 to 90 are 26 letters in the alphabet so you can also do that here's a neat one array looping so this is a simple array script it will print this is line number starting from 1 and it's going to loop through 10 so if i press this it prints the stuff below this one is a useful one this will create a folder with the name 2021 and it will create it under this directory and then also what the script does it will create subfolders and name them as this month month and then the year 2021 and then within that subfolder it will create another directory called monthly log so to demonstrate this let's go ahead and run this so here is the 2021 under this directory if i drill down into this here is the output month month in this format and then it prints out the actual january feb mar april you know and then within each of these folders is a subfolder called monthly log and inside here there's nothing in it but you can see the power how fast it created these folders and subfolders so within each folder there is a subfolder called monthly log you can also create folders named one through whatever value you provide in here so in this case this will create folders one through 12 with a single button click and here it is folders 1 through 12. inside of them i didn't specify any subfolders here is another one you can create folders a through z with one button let's go ahead and run this and this created folders a through z this one is a cool script it does some file manipulation so basically let's go ahead and read this description it creates a text file with the alphabet a through z in a column style so a horizontal style and then it converts that file into a row style a vertical and adds a comma in between each letter so if you had to do this manually this would take some time but with powershell if you script it correctly it runs within seconds so here it is here's the alphabet file that has the alphabet a through z in a vertical and here is the new sorted alphabet which took those values and comma separated them so it's pretty neat it shows you the power of powershell and this one is also pretty neat so this will convert a string to a binary output in this case i wrote hello and thanks for watching please subscribe and this will print out this string into a binary format which is bunch of zeros ones and then it will start firefox and go to this binary translator web page that i came across and then it puts the binary values on the clipboard and let's go ahead and demonstrate this so i'm going to press f5 so now the binary values are on my clipboard and let's go ahead and change this from binary to text do a paste as you can see on the left side so these are the binary values which if you look at them you have no idea what they mean but this translator translates whatever i wrote in that string so this can be useful if you wanna maybe send passwords to people but you don't want to actually send the real password in like a string format you can convert it into a binary which it is not the safest also way because these are very easy to crack but it's a cool script that kinda does that for you i hope you enjoyed this video i will be putting out more powershell scripts and stay tuned and please hit that thumbs up and subscribe to my channel thank you
Info
Channel: How To Work From Home
Views: 239
Rating: 5 out of 5
Keywords: PowerShell, PowerShell ISE, Microsoft, Microsoft PowerShell ISE, Automation
Id: ZxAnodjnopU
Channel Id: undefined
Length: 11min 22sec (682 seconds)
Published: Sun Oct 11 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.