IT tutorials
 
Technology
 

Windows Server 2012 : Highly available, easy-to-manage multi-server platform - Management efficiency (part 3) - PowerShell 3.0

11/2/2013 9:04:25 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

PowerShell 3.0

PowerShell has become the de facto platform for automating the administration of Windows-based environments. Built on top of the common language runtime (CLR) and the Microsoft .NET Framework, PowerShell has brought a whole new paradigm to how computers running Windows are configured and managed in enterprise environments.

A new version 3.0 of PowerShell is now included in Windows Server 2012. PowerShell 3.0 is built upon the Windows Management Framework 3.0, which includes a new WMI provider model that reduces dependency on COM, a new API for performing standard Common Information Model (CIM) operations, and the capability of writing new PowerShell cmdlets in native code. Windows Management Framework 3.0 also includes improvements that make WinRM connections more robust so they can support long-running tasks and be more resilient against transient network failure.

PowerShell 3.0 includes many new features that bring added flexibility and power for managing cloud and multiserver environments. Many of these key new capabilities are discussed next.

New cmdlets

Windows Server 2012 includes hundreds of new PowerShell cmdlets that help you manage almost every aspect of your private cloud environment. Note that many cmdlets are only available when the appropriate server role or feature is installed.

Show-Command

PowerShell 3.0 includes a new cmdlet called Show-Command that displays a GUI for a command with a simpler overview of any PowerShell cmdlet. This capability can make it much easier to understand the syntax of a cmdlet, as opposed to using the Get-Help cmdlet. For example, if you want to understand the syntax of the Install-ADDSDomain cmdlet used to promote a server to a domain controller, you can type Get-Command Install-ADDSDomain in the PowerShell console to open the dialog box shown in Figure 5.

Example of using the Show-Command cmdlet.

Figure 5. Example of using the Show-Command cmdlet.

Disconnected sessions

PowerShell 3.0 now supports persistent user-managed sessions (PSSessions) that are not dependent upon the session in which they were created. By using the New-PSSession cmdlet, you can create and save a session on a remote server and then disconnect from the session. The PowerShell commands in the session on the remote server will then continue to execute, even though you are no longer connected to the session. If desired, you can reconnect later to the session from the same or a different computer.

To work with disconnect sessions, you simply do the following:

  1. Enable remoting.

  2. Create a PSSession to the remote computer.

  3. Invoke some PowerShell commands on the remote computer.

  4. Verify the completion of the commands on the remote computer.

PowerShell workflows

PowerShell workflows let you write workflows in PowerShell or using Extensible Application Markup Language (XAML) and then run your workflows as if they were PowerShell cmdlets. This enables PowerShell to use the capabilities of the Windows Workflow Foundation to create long-running management activities that can be interrupted, suspended, restarted, repeated, and executed in parallel.

PowerShell workflows are especially valuable in cloud computing environments because they help you automate administrative operations by building in repeatability and by increasing robustness and reliability. They also help increase your servers-to-administrators ratio by enabling a single administrator to execute a PowerShell workflow that runs simultaneously on hundreds of servers.

Scheduled Jobs

PowerShell 2.0 introduced the concept of background jobs, which can be scheduled to run asynchronously in the background. PowerShell 3.0 now includes cmdlets like Start-Job and Get-Job that can be used to manage these jobs. You can also easily schedule jobs using the Windows Task Scheduler. This means that you, as the administrator, can now have full control over when PowerShell scripts execute in your environment.

PowerShell Web Access

PowerShell Web Access lets you manage the servers in your private cloud from anywhere, at any time, by running PowerShell commands within a web-based console. PowerShell Web Access acts as a gateway to provide a web-based PowerShell console that you can use to manage remote computers. This lets you run PowerShell scripts and commands even on computers that don’t have PowerShell installed. All your computer needs is an Internet connection and a web browser that supports JavaScript and accepts cookies.

To use PowerShell Web Access, begin by installing it using the Add Roles And Features Wizard, which you can start from Server Manager:

image with no caption

Installing PowerShell Web Access also installs the .NET Framework 4.5 features and the Web Server (IIS) server role, if these are not already installed on the server. You can also install PowerShell Web Access with PowerShell by using the Install-WindowsFeature cmdlet.

Next, configure PowerShell Web Access on your server. You can do this by running the Install-PswaWebApplication cmdlet. You’ll need to have already installed a server certificate on your server. If you are trying this in a test environment, however, you can use a self-signed test certificate, as shown here:

image with no caption

Once you’ve configured PowerShell Web Access, you need to grant users access explicitly by adding authorization rules. You can use the Add-PswaAuthorizationRule cmdlet to do this:

image with no caption

Administrators can then run PowerShell scripts and commands against servers they have been authorized to manage by accessing the gateway from a remote computer. They do this by opening the URL https://<server_name>/pswa in a web browser:

image with no caption


Managing non-Windows systems and devices

You can now use PowerShell cmdlets to manage any standard-compliant CIM-capable systems, which means you can manage non-Windows servers and even hardware devices using PowerShell just as you manage Windows.

Other improvements

Some other improvements in PowerShell 3.0 include the following;

  • Delegated administration using RunAs allows commands to be executed using a delegated set of credentials so that users having limited permissions can run critical jobs.

  • Improved cmdlet discovery and automatic module loading make it easier to find and run any cmdlets installed on your computer.

  • Show-Command, a cmdlet and ISE Add-On that helps you quickly find the right cmdlet, view its parameters in a dialog box, and run the command.

  • Simplified language syntax that make PowerShell commands and scripts seem a lot less like code and feel more like natural language. For example, the construct $_. is no longer necessary.

  • The Get-ChildItem cmdlet has new parameters, making it easier to search for files with particular attributes.

  • PowerShell now automatically loads a module when a cmdlet is run from that module.

  • The PowerShell 3.0 Integrated Scripting Environment (ISE) includes new features that make it easier to code in PowerShell. Examples of these features include Intellisense, brace-matching, syntax coloring, Most Recently Used list, snippets, and the ISE Script Explorer.

  • With PowerShell 3.0, you are no longer restricted to the help content that shipped with Windows Server 2012. Help is now published on the web as downloadable CAB files.

 
Others
 
- Windows Server 2012 : Highly available, easy-to-manage multi-server platform - Management efficiency (part 2) - Simplified Active Directory administration
- Windows Server 2012 : Highly available, easy-to-manage multi-server platform - Management efficiency (part 1) - The new Server Manager
- Windows Server 2012 : Highly available, easy-to-manage multi-server platform - Cost efficiency - Storage Spaces
- System Center Configuration Manager 2007 : Client Management - Client Discovery (part 2) - Network Discovery
- System Center Configuration Manager 2007 : Client Management - Client Discovery (part 1) - Active Directory User Discovery
- Windows Vista : Providing User Data Protection (part 3) - Putting data protection in place - Enabling roaming profiles, Enabling folder redirection
- Windows Vista : Providing User Data Protection (part 2) - Putting data protection in place - Enabling the Distributed File System
- Windows Vista : Providing User Data Protection (part 1) - Completing a data protection strategy
- Windows Vista : Protecting User Data - Protecting User Profiles
- SharePoint 2013 : Associate a Workflow with a List or Library
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us