Skip to main content


Practice Exercises for PowerShell Intermediate

Recent posts

Practice Exercises for PowerShell Beginner

  Practice Exercise1: File Operations/Searching/Basic PowerShell Operators 1.) Create a folder  TestingPurpose  and 3 Subfolders inside it SubFolder1, SubFolder2 2.) Create some test files inside these folders: TypeATest1.txt, TypeATest2.txt  … TypeATest50.txt into SubFolder1 TypeBTest51.txt, Purpose52Test2.txt … TypeBTest100 into SubFolder2 Needless to say that you have to use logic for creating these files. Not one by one 3.) Move all files which have an odd number in its name to SubFolder2 4.) Move all files which have even number in its name to SubFolder1 5.) Rename folder SubFolder1 to EvenFilesContainer and SubFolder2 to OddFilesContainer 5.) Prepare a list of all files currently existing inside folder  TestingPurpose      Example:  MasterFile.txt: As of YYYYMMDD HH: MM files inside Testing Purpose are: C:\testingPurpose\EvenFilesContainer\TypeBTest2.txt . . C:\testingPurpose\OddFilesContainer\TypeATest99.txt 6.) Delete all files which start with TypeA  

PSScriptAnalyzer to Analyze your Scripts

When you write a PowerShell script, you might constantly think about whether you are following best practices or no.  Do you know you have a tool that is very handy to use and can you in analyzing your PowerShell scripts? It is PSScriptAnalyze First of all you need to install the module.  Install-Module -Name PSScriptAnalyzer  If your Powershell version is less than 5.1( First run below command); Install-PackageProvider Nuget -MinimumVersion –Force And make sure you are running PowerShell in admin mode and you are running PowerShell in admin mode. & That’s it.  Now your good friend PSScriptAnalyzer will help you in analyzing your scripts.   Import-Module PSScriptAnalyzer  Invoke-ScriptAnalyzer -Path .\test.ps1  How cool is that :)  Go ahead and analyze your script and let e know how many p For more information

5 Tips to secure a job in Azure Cloud

I assume most of you are already doing well in your careers and have got no good reason to switch job profile. But at the same time, there may be many who due to many reasons, want to explore new carrier opportunities. This post is just to help those who are seeking a rewarding carrier in Cloud Computing.  Since I am working on Azure in my profession (Microsoft Azure, Technical Lead in an MNC), I will only be able to provide inputs for Azure, But I have nothing against other cloud service providers. You can still go through this post for reference. How to get a dream job and start a career in the world of Microsoft Azure? Time Required: 2 months ' Step1: Set Your Goal. There are so many areas in Cloud Services where you can contribute, doesn't matter what you are doing currently. It is very easy to get lost. So spend a decent amount of time thinking about what exactly you want to do. For example, If you are more interested in deploying the VMs, VNets, configure load bala