Düzenle

Aracılığıyla paylaş


Get-CMFolder

Get one or more folders in the console.

Syntax

Get-CMFolder
   [[-Name] <String>]
   [-InputObject <IResultObject>]
   [-ParentFolderPath <String>]
   [-TypeName <String>]
   [-IsEmpty <Boolean>]
   [-IsSearchFolder <Boolean>]
   [-SiteCode <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMFolder
   -Id <Int32>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMFolder
   -Guid <Guid>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMFolder
   -FolderPath <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

Use this cmdlet to get all customized folders or folders from the specified parent path.

Note

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

Examples

Example 1

$parentPath = 'DeviceCollection'
$name = 'Folder1'
$name2 = 'Folder2'
$name3 = 'Folder3'
$root = New-CMFolder -ParentFolderPath $parentPath -Name $name
$folder = Get-CMFolder -FolderPath ($parentPath + '\' + $name + '\' + $name2 + '\' +$name3)

Parameters

-DisableWildcardHandling

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

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

-FolderPath

Specify the path to the console folder. For example, DeviceCollection\Folder1

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ForceWildcardHandling

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

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

-Guid

Specify the GUID of the console folder.

Type:Guid
Aliases:FolderGuid
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Id

Specify the ID of the console folder.

Type:Int32
Aliases:ContainerNodeID
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Specify a folder object for the parent container.

Type:IResultObject
Aliases:ParentContainerNode
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-IsEmpty

Set this parameter to $true to filter the results by empty folders.

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

-IsSearchFolder

Set this parameter to $true to filter the results by search folders.

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

-Name

Specify the name of the console folder.

Type:String
Position:0
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

-ParentFolderPath

Specify the path of the parent folder.

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

-SiteCode

Specify the three-character code for the site.

Type:String
Aliases:SourceSite
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TypeName

Specify the type to filter the results. For example:

  • SMS_Collection_Device
  • SMS_Package
  • SMS_Driver
Type:String
Aliases:ObjectTypeName
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject[]

IResultObject

Notes

For more information on this return object and its properties, see SMS_ObjectContainerNode server WMI class.