Welcome to PowerShell Weekly!






Hello World!

My name is Michael J. Thomas and my brother Edward L. Thomas are both PowerShell enthusiast who create and use scripts on a daily basis to improve and automate our everyday tasks as systems administrators. It is my hope to be able to share with you PowerShell Scripts and examples that just might help you in your every day tasks as an IT professional.

The continuous improvement cycle is the perfect example of what we can do to improvement the environment around us. We must identify those repetitive tasks and make a plan with how we can reduce those processes. Then we must execute and implement that change. Review if those changes are effective and continue to improve upon them. 

Sometimes we need to buy tools to help us get where we need to go to improve proceses. I'm a hug fan of Sapien PowerShell Studio for building executable with a GUI for end users. I've created many programs with PowerShell Studio to help with automation in many different IT Departments.

We will be including examples made with this program. You can buy it at www.sapien.com but it is a bit expensive but worth it. You might be able to talk your department into buying it for you. If not then, I say put yourself out there and show them what can be done with it and get it yourself.

Sometimes you have to invest in yourself to show the talents you have to others and expressing those talents in a way others can understand. When you truly learn how to automate processes with that used to be very time consuming, your management will notice and see how much you are saving the company in time and money by applying your skills in automation. Recognition does not always come in the form as one may expect but doing the right thing in helping your companies best interests will over time.

Unfortunately, not everyone understands the many benefits of PowerShell. There are some systems administrators that believe in doing everything manual. I ran into a systems administrator that did not know any PowerShell at all, he handled all of the On-boarding and Off-boarding of all of the employees. He told me that he did not trust automation because he believed he would be able to do it better than what automation had to offer. I had pointed out to him if he had put certain checks and balances into place with automation that the company would see a lot less tickets in regards to mistakes that happened on his end in error.

He was an interesting fellow, he never liked to get any incident tickets sent to him, due to the mistakes and problems that had happened during the onboarding process. He seemed to always try to hide his mistakes instead of improve his processes. Everyone makes mistakes, lets just learn from them and make a proactive approach to improving processes and preventing future mistakes.

Lets not be that person who does not want to improve our life with process improvements. Lets do everything that we can to learn and improve our processes in our everyday life. Implementing the lifestyle of continuous improvement.

For those who are new to PowerShell, let the adventure begin. You are going to want to know the most basic and handy cmdlets.
  
Cmdlets express as a verb-noun pair, has a .ps1 extension. Each cmdlet has a help file that can be accessed by typing Get-Help <cmdlet-Name> -Detailed.  The detailed view of the cmdlet help file includes a description of the cmdlet, the command syntax, descriptions of the parameters and an example that demonstrate the use of the cmdlet. 


Cmdlet
Function
 Get-Help  Get help for each cmdlet.
 Get-Location  Get the current directory
 Set-Location  Change the current directory
 Copy-Item  Copy files
 Remove-Item  Remove a file or directory
 Move-Item  Move a file
 Rename-Item   Rename a file
 New-Item  Create a new empty file or directory

Get-ExecutionPolicy will get the policy from the system and show what is allowed on the system.
In general we are more than likely going to want this policy to be RemoteSigned. You can set it as such with the cmdlet:  Set-ExecutionPolicy RemoteSigned -Force


Now you can begin using PowerShell. When testing scripts, do not use in a live environment unless you know what you are doing. You should do your testing in a virtual environment as a best practice.

Knowing what your script is going to do before running it will always prevent the unintentional error.



Michael J. Thomas
Over 20 years of Systems Administration Experience and a 
Lifetime Process Improvement Fellow

B.S. Information Technology - Network Administration

ITIL, A+, Network+, Project+, MCSA: Windows Server 2012 & 2003, MCSA: Windows 8,

MCTS: Windows 7 & Vista, MCP,MTA, CIW Webs Design Specialist, CIW JavaScript Specialist



Comments

Popular posts from this blog

Add-RemoteDesktopUsers

Invoke-Reprofile

Mike's Profile Cleanup Tool