Adding a Manageable Configuration Source
If you want to use Group Policy or Windows Management Instrumentation (WMI) with an application, you must first add a manageable configuration source. Although the procedures shown here use the Configuration Console, you can use the same procedures with the Configuration Editor that is integrated with Visual Studio. For more information about the Configuration Editor, see Using the Configuration Tools.
To add a manageable configuration source
Start the Enterprise Library Configuration Console or the Visual Studio Configuration Editor. To use the Configuration Console, click Start, point to All Programs, point to Microsoft patterns & practices, point to Enterprise Library 4.1 – October 2008, and then click Enterprise Library Configuration.
Click New Application or Open Existing Application.
Right-click the application configuration file listed under Enterprise Library Configuration, point to New, and then click Configuration Sources.
Right-click the Configuration Sources node, point to New, and then click Manageable Configuration Source.
Click the Configuration Sources node.
In the right pane, click SelectedSource.
In the drop-down list, click Manageable Configuration Source.
Click the Manageable Configuration Source node. In the right pane, set the configuration settings. By default, both WMI and Group Policy are enabled. You must provide an entry for the File property.
Right-click the System Configuration Source, and then click Remove.
On the File menu, click Save Application.
Windows PowerShell Handles Console Input and Display
When you type a command, Windows PowerShell always processes the command-line input directly. Windows PowerShell also formats the output that you see on the screen. This is significant because it reduces the work required of each cmdlet and ensures that you can always do things the same way regardless of which cmdlet you are using. One example of how this simplifies life for both tool developers and users is command-line help.
Traditional command-line tools have their own schemes for requesting and displaying help. Some command-line tools use /? to trigger the help display; others use -?, /H, or even //. Some will display help in a GUI window, rather than in the console display. Some complex tools, such as application updaters, unpack internal files before displaying their help. If you use the wrong parameter, the tool might ignore what you typed and begin performing a task automatically.
When you enter a command in Windows PowerShell, everything you enter is automatically parsed and pre-processed by Windows PowerShell. If you use the -? parameter with a Windows PowerShell cmdlet, it always means "show me help for this command". Cmdlet developers do not have to parse the command; they only need to provide the help text.
It is important to understand that the help features of Windows PowerShell are available even when you run traditional command-line tools in Windows PowerShell. Windows PowerShell processes the parameters and passes the results to the external tools.
Note:
If you run an graphic application in Windows PowerShell, the window for the application opens. Windows PowerShell intervenes only when processing the command-line input you supply or the application output returned to the console window; it does not affect how the application works internally.
Posted in: Internet Topic| Tags: PowerShell Windows Application Console Handle command cmdlet output help display window input