ConvertFrom-CMIResultObject

Converts from an IResultObject to a ManagementBaseObject .

Syntax

ConvertFrom-CMIResultObject
           -InputObject <IResultObject>
           [-DisableWildcardHandling]
           [-ForceWildcardHandling]
           [<CommonParameters>]

Description

The Convertfrom-CMIResultObject cmdlet converts from an IResultObject to a ManagementBaseObject.

Examples

Example 1: Convert an IResultObject to a ManagementBaseObject by getting a site object

PS ABC:\> $Site = Get-CMSite -SiteCode PS1
PS ABC:\> ConvertFrom-CMIResultObject -InputObject $Site

The first command gets the site object with the code PS1 and stores the object in the $Site variable.

The second command converts the site stored in $Site to a ManagementBaseObject.

Example 2: Convert an IResultObject to a ManagementBaseObject by getting a site by its code

PS ABC:\> ConvertFrom-CMIResultObject -InputObject (Get-CMSite -SiteCode PS2)

This command gets the site with the code PS2 and then converts the site to a ManagementBaseObject.

Required Parameters

-InputObject

Specifies the IResultObject to convert to a ManagementBaseObject.

Type:IResultObject
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False