/ June 2017

Starting Windows PowerShell

What is PowerShell? 
  •  Replacement for VB Scripting and Command Prompt 
  •  A task automation and configuration management tool for IT professionals 
  •  An interactive object-oriented command environment with scripting language features utilizing small programs called cmdlets
  •  Simplifies configuration, administration and management of heterogeneous environments 
  • Standard-based remoting protocols 
  •  Object based extensible scripting solution integrated into Windows OS
  •  Great for IT professionals who do not have  time and need to simplify.
Why Use PowerShell for DB Management?

 ● Lightweight tool to manage simple database operations
 ● Utilize the power of .NET
 ● Not GUI
 ● Lack of command line scripting for Oracle database management in Microsoft
 ● Database task automation without having to use a batch file, job, etc
 ● DBAs typically manage multiple databases (Oracle, SQL Server, MySQL)




Installing Windows PowerShell

Windows® 8 and Windows Server® 2012 include Windows PowerShell 3.0 and all of its prerequisites. The system also includes the Windows PowerShell 2.0 engine for backward compatibility with host programs that cannot use Windows PowerShell 3.0.
This topic explains how to install Windows PowerShell 3.0 on earlier systems and install and enable the required features.
This topic includes the following sections:

Installing Windows PowerShell on Windows 8 and Windows Server 2012

Windows PowerShell 3.0 arrives installed, configured, and ready to use. Windows PowerShell Integrated Scripting Environment (ISE) is installed and enabled. For information about starting Windows PowerShell, see Starting Windows PowerShell on Windows 8 and Starting Windows PowerShell on Windows Server 2012.

Installing Windows PowerShell on Windows 7 and Windows Server 2008 R2

These instructions explain how to install Windows PowerShell 3.0 on computers running Windows 7 with Service Pack 1 and Windows Server 2008 R2 with Service Pack 1. There are separate installation instructions below for computers running with the Server Core installation option of Windows Server 2008 R2.

Getting ready to install

  • Before installing Windows Management Framework 3.0, uninstall any previous versions of Windows Management Framework 3.0.

To install Windows PowerShell 3.0

  1. Install the full installation of Microsoft .NET Framework 4 (dotNetFx40_Full_setup.exe) from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=212547.
    Or, install Microsoft .NET Framework 4.5 (dotNetFx45_Full_setup.exe) from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=242919.
  2. Install Windows Management Framework 3.0 from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=240290.
For information about starting Windows PowerShell 3.0, see Starting Windows PowerShell on Earlier Versions of Windows.

Installing Windows PowerShell on Server Core

These instructions explain how to install Windows PowerShell 3.0 on computers running the Server Core installation option of Windows Server 2008 R2 with Service Pack 1.
The first steps in the procedure use Deployment Image Servicing and Management (DISM) commands to install Microsoft .NET Framework 2.0 for Server Core and Windows PowerShell 2.0. These programs are prerequisites for Windows Management Framework 3.0, which is installed in a subsequent step.

Getting ready to install

  • Before installing Windows Management Framework 3.0, uninstall any previous versions of Windows Management Framework 3.0.

To install Windows PowerShell 3.0

  1. Start Cmd.exe
  2. Run the following DISM commands. These commands install .NET Framework 2.0 and Windows PowerShell 2.0.
    dism /online /enable-feature:NetFx2-ServerCore
    dism /online /enable-feature:MicrosoftWindowsPowerShell
    dism /online /enable-feature:NetFx2-ServerCore-WOW64
    
  3. Install Microsoft .NET Framework 4.0 full installation for Server Core from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=248450.
  4. Install Windows Management Framework 3.0 from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=240290.

Installing Windows PowerShell on Windows Server 2008

These instructions explain how to install Windows PowerShell 3.0 on computers running Windows Server 2008 with Service Pack 2.
On Windows Server 2008 systems, Windows Management Framework (Windows PowerShell 2.0, KB 968930) is a prerequisite for Windows Management Framework 3.0. The "Extended Protection for Authentication" feature protects the computer from authentication forwarding attacks and allows you to use the UseSSL parameter when creating remote sessions. To install Windows PowerShell 3.0 and the Windows PowerShell 2.0 Engine, use the following procedure.

Getting ready to install

  • Before installing Windows Management Framework 3.0, uninstall any previous versions of Windows Management Framework 3.0.

To install Windows PowerShell 3.0

  1. Install Microsoft .NET Framework 3.5 with Service Pack 1 from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=242910.
  2. Install Windows Management Framework (Windows PowerShell 2.0, KB 968930) from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkId=243035.
  3. Install the full installation of Microsoft .NET Framework 4 (dotNetFx40_Full_setup.exe) from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=212547.
    Or, install Microsoft .NET Framework 4.5 (dotNetFx45_Full_setup.exe) from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=242919.
  4. Install "Extended Protection for Authentication" (KB 968389) from http://go.microsoft.com/fwlink/?LinkID=186398.
  5. Install Windows Management Framework 3.0 from the Microsoft Download Center at http://go.microsoft.com/fwlink/?LinkID=240290.

Windows PowerShell System Requirements

 System requirements for Windows PowerShell 3.0, Windows PowerShell 4.0 and Windows PowerShell 5.0, and for special features, such as Windows PowerShell Integrated Scripting Environment (ISE), CIM commands, and workflows.
Windows® 8.1 and Windows Server® 2012 R2 include all required programs. This topic is designed for users of earlier releases of Windows.
Operating System Requirements
Windows PowerShell 5.0 runs on the following versions of Windows.
Windows PowerShell 4.0 runs on the following versions of Windows.
Windows PowerShell 3.0 runs on the following versions of Windows.
Microsoft .NET Framework Requirements
Windows PowerShell 5.0 requires the full installation of Microsoft .NET Framework 4.5. Windows 8.1 and Windows Server 2012 R2 include Microsoft .NET Framework 4.5 by default.
Windows PowerShell 4.0 requires the full installation of Microsoft .NET Framework 4.5. Windows 8.1 and Windows Server 2012 R2 include Microsoft .NET Framework 4.5 by default.
Windows PowerShell 3.0 requires the full installation of Microsoft .NET Framework 4. Windows 8 and Windows Server 2012 include Microsoft .NET Framework 4.5 by default, which fulfills this requirement.
To install Microsoft .NET Framework 4.5 (dotNetFx45_Full_setup.exe), see Microsoft .NET Framework 4.5 on the Microsoft Download Center.
To install the full installation of Microsoft .NET Framework 4 (dotNetFx40_Full_setup.exe), see Microsoft .NET Framework 4 (Web Installer) on the Microsoft Download Center.