Windows Classroom Session – 28/Sept/2020

Conditionals & looping (contd..)

$servers = @('google.com', 'facebook.com', 'linkedin.com', 'asdklfjasdkl')
for($index=0; $index -lt $servers.Length; $index++) {
    echo $servers[$index]
}
  • while loop:
  • do/while & do until:
    • do while will be executed as long as your condition is true
    • do unitil is inverse of it
    • For Example Refer Here

For Creating Windows Server on AWS Cloud

ERROR Handling

  • try catch & finally

How to work with many powershell cmdlets

  • Start using Cheatsheets. Here is reference to one of many cheats

Next Steps:

  1. Understand Powershell Modules
  2. Understand Thirdparty Powershell Modules
    1. Functions
    2. Cmdlets
  3. Writing a full powershell script which is interactive or silent
./InstallWebServer.ps1
Installing IIS8 on your Server. Do you want to Continue? (Y/N)

./InstallWebServer.ps1 -Silent

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube