Introducing Microsoft Windows Server 2012

Page 166

Show-Command Windows PowerShell 3.0 includes a new cmdlet called Show-Command that displays a GUI for a ­command with a simpler overview of any Windows 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 Show-Command ­Install-ADDSDomain in the Windows PowerShell console to open the dialog box shown in Figure 3-12.

FIGURE 3-12  Example of using the Show-Command cmdlet.

For more information on the capabilities of the Show-Command cmdlet, see the blog post titled “Running show-command for a cmdlet” on the Windows PowerShell blog at http://blogs.msdn.com/b/powershell/archive/2012/04/13/running-show-command-fora-cmdlet.aspx.

Disconnected sessions Windows 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 Windows 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.

152 Chapter 3

Highly available, easy-to-manage multi-server ­platform


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.