add

23 February 2016

PowerShell for Administrators

Posted By: Md Monarul Islam - 1:21 PM


PowerShell is the most powerful automation tool that Microsoft has to offer, and its both a shell and a scripting language. Please note that this series is based on PowerShell 3, which ships with Windows 8 and Server 2012. If you are running Windows 7 please download the PowerShell 3 update before you continue.


This tutorial is your entry-level introduction to PowerShell. No prior scripting experience is required! If you can run "ipconfig" then you can master PowerShell. Rather than relying on complex scripting languages and partial capabilities, with PowerShell you'll finally enjoy a complete, consistent administrative experience that encompasses both the GUI and the command line. NT-Campus shows you how to run commands, access the built-in help system, and extend the power of PowerShell with product shells, PSSnapins, and modules. Plus, learn how to work with PowerShell objects and variables, enable remote access, manage input and output, configure security policies, and save time by turning commands into reusable tools.


How to install/configure Powershell 3.0



n this tech tip, we’re going to lay the foundation for a series of future discussions that will heavily leverage the use of Powershell [in Office 365, Windows Server, and Exchange].  Powershell is a native component of Windows 7, Windows 8, Server 2008 R2, and Server 2012. It can be added via installation to Vista SP1 and SP2, Server 2008 SP1 and SP2, Server 2003 SP2, and Windows XP SP3. It should be noted that Powershell 3.0 and the ISE come  preinstalled on 8 and 2012, but have to be upgraded-to in 7 and 2008 R2.

Step 1Install .NET Framework 4.0 or later
Powershell 3.0 runs on the .NET Framework, and requires version 4.0 or 4.5. If you do not have these installed on your PC, you will need to do this first.
(If you are unsure of what’s installed on your machine, go into Programs and Features in Control Panel. It will be listed as “Microsoft .NET Framework x.x”.)
The respective download/install links for the 4.x are below. If you want the latest and greatest, you can install v4.5. (It’s what I use on my Windows 7 Pro SP1 machine.) But v4.0 works just as well and supports all of the functions and cmdlets that we will be using in future techtips.
OR

Step 2 - Install the Windows Management Framework 3.0
WMF 3.0 is a rollup package that includes Powershell 3.0, WMI, and WinRM. (There are a few others as well, but for the purposes of this article they’re not important.) When you click the following link, you will be presented with a big red download button. Upon clicking it, you will be given the option to download several files.
  • If you have Windows 7 64-bit, you want the file named: Windows6.1-KB2506143-x64.msu
  • If you have Windows 7 32-bit, you want the file named: Windows6.1-KB2506143-x86.msu
Download the file appropriate to your OS, close any Powershell windows you may have open, and then run the installer once the download finishes. Once you’ve completed the install, reboot your PC.

Step 3Configure Powershell to run scripts
Run Powershell as an administrator, and run the following command:
Set-ExecutionPolicy RemoteSigned

Step 4Configure WinRM
Open up a command prompt as an administrator, and then run the following commands (you can copy/paste them) in:
net start winrm
winrm set winrm/config/client/auth @{Basic="true"}
You’re all done!

About Md Monarul Islam

Hi, I’m Md Monarul Islam. Nice name Monir, from Dhaka-Bangladesh.I am complete my Post-graduation in National University of Bangladesh. Department of Management and I am also study in Network Technology-NT from IDB-BISEW IT Scholarship project-R27. I am always wanted a great system administrator with World wide Network specialist. As a Bangladeshi my mother tongue is বাংলা (Bangla). So, you may find grammatical mistakes in my post. Sorry for the inconvenience.

0 comments:

Post a Comment

© 2016 - Designed by: MONIR IT