Edit

Share via


ConvertFrom-CMIResultObject

Converts from an IResultObject to a ManagementBaseObject.

Syntax

Default (Default)

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

Description

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

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

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.

Parameters

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Specifies the IResultObject to convert to a ManagementBaseObject.

Parameter properties

Type:IResultObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object