Prev | Current Page 666 | Next

Joezer Cookey-Gam, Brendan Keane, Jeffrey Rosen, and Jonathan Runyon

"Professional Windows PowerShell for Exchange Server 2007 Service Pack 1"


Part IV: Automating Administration
488
??‘ Overloaded methods are methods that parameters are passed to modify how the action completes.
??‘ Casting is the process of converting an object from one data type to another. For example, an
integer can be converted to a string.
To be able to access PowerShell from the .NET Framework, a runspace must be created. A runspace object
provides the ability for an application to be able to host or execute pipelines in a controlled manner. A
runspace is created using the RunspaceFactory class. This class has only one method, CreateRunspace .
This CreateRunspace method has four overloaded methods and the one of interest is the overload
that requires a RunspaceConfiguration object as input. The RunspaceConfiguration object
provides the ability to pass configuration parameters to the runspace. The following example creates a
RunspaceConfiguration object and adds in the Exchange administration snap - in so that you are able to
access the Exchange tools. If a runspace is created without passing a RunspaceConfiguration object, the
runspace would not have access to the Exchange management tools. The RunspaceConfiguration
object can be created with the number of PowerShell snap - ins that you require.
The code to create the runspace and add the Exchange snap - in looks like this:
RunspaceConfiguration EMSConfig =
RunspaceConfiguration.


Pages:
654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678
studia podyplomowe logistyka multihack do metina 2 Everest Poker Bonus Kod wyposażenie siłowni Niederlande - Hotels weltweit