Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Get-CMFolder
- Module:
- ConfigurationManager Module
Get one or more folders in the console.
Syntax
SearchByName (Default)
Get-CMFolder
[[-Name] <String>]
[-InputObject <IResultObject>]
[-ParentFolderPath <String>]
[-TypeName <String>]
[-IsEmpty <Boolean>]
[-IsSearchFolder <Boolean>]
[-SiteCode <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
SearchByIdMandatory
Get-CMFolder
-Id <Int32>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
SearchByGuidMandatory
Get-CMFolder
-Guid <Guid>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
SearchByPathMandatory
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.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-FolderPath
Specify the path to the console folder. For example, DeviceCollection\Folder1
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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
-Guid
Specify the GUID of the console folder.
Parameter properties
| Type: | Guid |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | FolderGuid |
Parameter sets
-Id
Specify the ID of the console folder.
Parameter properties
| Type: | Int32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ContainerNodeID |
Parameter sets
-InputObject
Specify a folder object for the parent container.
Parameter properties
| Type: | IResultObject |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ParentContainerNode |
Parameter sets
-IsEmpty
Set this parameter to $true to filter the results by empty folders.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-IsSearchFolder
Set this parameter to $true to filter the results by search folders.
Parameter properties
| Type: | Boolean |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Specify the name of the console folder.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | True |
| DontShow: | False |
Parameter sets
-ParentFolderPath
Specify the path of the parent folder.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SiteCode
Specify the three-character code for the site.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | SourceSite |
Parameter sets
-TypeName
Specify the type to filter the results. For example:
SMS_Collection_DeviceSMS_PackageSMS_Driver
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ObjectTypeName |
Parameter sets
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
IResultObject
IResultObject
Notes
For more information on this return object and its properties, see SMS_ObjectContainerNode server WMI class.
Related Links
Feedback
Was this page helpful?
