You know you are going to need to learn it sooner rather than later.
I use PowerShell every day for my job, and love using it. It's faster. It's easier to write.
An extra bonus, if you are familiar with C# you can utilize .NET to assist in some situations.
I am going to show you what PowerShell cmdlets I use on a daily basis that help me find what I need within PowerShell.
Like you, at first, I had no idea what I was doing, but PowerShell is easier then you think.
Technically, you only need to remember a few commands and you can reference or search to see if a command or documentation exists in PowerShell.
Here are the commands you should remember:
This PowerShell cmdlet is the one I use the most. If I am unsure of how to do something or to see if something exists within PowerShell I use the Get-Help cmdlet. You can use the cmdlet to view the documentation on a specific cmdlet or to receive a list of available cmdlets that contain a keyword.
Here is an example of how I use the Get-Help cmdlet.
Get-Help *CM* # Will list the available ConfigMgr cmdlets available.
PS > Get-Help *CM*
Name Category Module Synopsis
---- -------- ------ --------
gcm Alias Get-Command
shcm Alias Show-Command
trcm Alias Trace-Command
icm Alias Invoke-Command
.... # This is only the first 4 items that populated out of many. The search came up with so many I ended up force stopping the process with the Ctrl + C
Here is a specific example of how to use the Get-Help cmdlet.
Say your boss has tasked you with deleting certain file extensions within a directory. He or she tells you there is about 1,000 plus files, and you need to comb through the directory to ensure the files containing these specified extensions are removed.
You don't have time to complete a one-by-one search for these files or even have time to complete a *.extension search through the directory.
You go back to your workstation and you say "Self, I wonder if PowerShell can help."
So, to see if PowerShell can help you can open a PowerShell window (elevated or not, dependent upon the situation) to find out.
Does PowerShell have the ability to delete? Let's find out
Type in Get-Help *Delete* and review the output.
If we type Get-Help *Delete* because we know we want to delete items PowerShell provides us with a list of cmdlets that contain the keyword delete either in the cmdlet itself or in the description. Let's review the results to see if we can find a cmdlet that may work for our particular situation. (go ahead take a few minutes to see which one you would use before proceeding to the answer).
Did you look?
Did you find one that may work?
Did you just skip and look ahead?
If you just skipped, shame (insert slow head shake).
The only way you will learn is to do.
Anyway, if we review each cmdlet and description we come upon the Remove-Item cmdlet.
We strongly consider this cmdlet because of the description, which reads Deletes the specified items.
If you look at the REMARKS section you can see it tells us how to access some examples of the cmdlet, so let's view these examples.
Review the examples of how to use the cmdlet. Does any seem to fit our particular task?
Given a specific directory and a specific list of extensions to delete from the directory we could simply CD into the specified directory and remove the files with the specified extensions.
The above snippet would delete files within the Sample directory that had the .txt and .docx extensions.
The other two cmdlets Get-Command and Get-Member, I do not use as often. However, you should be familiar with the two. If you put PowerShell on your resume more then likely you will be asked about these two cmdlets, as well as, the Get-Help.