{"content":"<div></div>","rawMetadata":{"metadata":{"_op_canonicalUrlPrefix":"https://learn.microsoft.com/zh-cn/powershell/","_op_gitContributorInformation":{"author":{"display_name":"Banreet Kaur","id":"92906285","name":"Banreet","profile_url":"https://github.com/Banreet"},"contributors":[{"display_name":"Aaron Czechowski","id":"26784733","name":"aczechowski","profile_url":"https://github.com/aczechowski"}],"update_at":"2026/6/25","updated_at_date_time":"2026-06-25T22:59:26.2722588Z"},"_path":"module/configurationmanager/get-cmfolder.json","_rel":"../../","_tocRel":"../sccm-ps/toc.json","apiPlatform":"powershell","author":"Banreet","breadcrumb_path":"/powershell/sccm/bread/toc.json","canonical_url":"https://learn.microsoft.com/zh-cn/powershell/module/configurationmanager/get-cmfolder?view=sccm-ps","content_git_url":"https://github.com/MicrosoftDocs/sccm-docs-powershell-ref/blob/main/sccm-ps/ConfigurationManager/Get-CMFolder.md","default_moniker":"sccm-ps","depot_name":"MSDN.sccm-powershell","document_id":"a4529307-50c5-dde3-1580-54f95872bcbf","document_version_independent_id":"a947cfed-9820-076b-d246-6a3793997509","external help file":"AdminUI.PS.dll-Help.xml","feedback_product_url":"https://feedbackportal.microsoft.com/feedback/forum/4669adfc-ee1b-ec11-b6e7-0022481f8472","feedback_system":"Standard","git_commit_id":"ba4485012229fafa0fdef3938edfbcfab0060cff","gitcommit":"https://github.com/MicrosoftDocs/sccm-docs-powershell/blob/ba4485012229fafa0fdef3938edfbcfab0060cff/sccm-ps/ConfigurationManager/Get-CMFolder.md","github_contributors":["aczechowski"],"locale":"zh-cn","manager":"laurawi","Module Name":"ConfigurationManager","monikers":["sccm-ps"],"ms.author":"dannygu","ms.date":"12/16/2021","ms.service":"configuration-manager","ms.subservice":"other","ms.topic":"reference","online version":"","open_to_public_contributors":true,"original_content_git_url":"https://github.com/MicrosoftDocs/sccm-docs-powershell/blob/live/sccm-ps/ConfigurationManager/Get-CMFolder.md","original_content_git_url_template":"{repo}/blob/{branch}/sccm-ps/ConfigurationManager/Get-CMFolder.md","PlatyPS schema version":"2.0.0","products":["https://authoring-docs-microsoft.poolparty.biz/devrel/f1499c3b-793f-48c3-a9ce-20285bcc6541"],"site_name":"Docs","titleSuffix":"Configuration Manager","uhfHeaderId":"MSDocsHeader-Powershell","updated_at":"2026-06-25 10:59 PM","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/get-cmfolder","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"Get-CMFolder","schemaType":"PowershellCmdlet","summary":"<p>在控制台中获取一个或多个文件夹。</p>\n","uid":"ConfigurationManager.Get-CMFolder"}],"ocv-translation-feedback":true},"_xrefmap":{"ConfigurationManager":{"href":"./","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"ConfigurationManager","schemaType":"PowershellModule","uid":"ConfigurationManager"},"ConfigurationManager.Get-CMFolder":{"href":"get-cmfolder","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"Get-CMFolder","schemaType":"PowershellCmdlet","summary":"<p>在控制台中获取一个或多个文件夹。</p>\n","uid":"ConfigurationManager.Get-CMFolder"}},"description":"<p>使用此 cmdlet 可从指定的父路径获取所有自定义文件夹或文件夹。</p>\n<div class=\"NOTE\">\n<p>注意</p>\n<p>从 Configuration Manager 站点驱动器运行 Configuration Manager cmdlet，例如 <code>PS XYZ:\\&gt;</code>。 有关详细信息，请参阅 <a href=\"/powershell/sccm/overview\">入门</a>。</p>\n</div>\n","examples":[{"code":"$parentPath = 'DeviceCollection'\n$name = 'Folder1'\n$name2 = 'Folder2'\n$name3 = 'Folder3'\n$root = New-CMFolder -ParentFolderPath $parentPath -Name $name\n$folder = Get-CMFolder -FolderPath ($parentPath + '\\' + $name + '\\' + $name2 + '\\' +$name3)","description":"","summary":"","title":"示例 1"}],"inputs":[{"description":"","name":"<span class=\"no-loc xref\">Microsoft.ConfigurationManagement.ManagementProvider.IResultObject</span>\n"}],"links":[{"href":"new-cmfolder","text":"New-CMFolder"},{"href":"remove-cmfolder","text":"Remove-CMFolder"},{"href":"set-cmfolder","text":"Set-CMFolder"}],"module":"ConfigurationManager","name":"Get-CMFolder","notes":"<p>有关此返回对象及其属性的详细信息，请参阅 <a href=\"/mem/configmgr/develop/reference/core/servers/console/sms_objectcontainernode-server-wmi-class\">SMS_ObjectContainerNode服务器 WMI 类</a>。</p>\n","outputs":[{"description":"","name":"<span class=\"no-loc xref\">IResultObject[]</span>\n"},{"description":"","name":"<span class=\"no-loc xref\">IResultObject</span>\n"}],"parameters":[{"aliases":"","defaultValue":"None","description":"<p>此参数将通配符视为文本字符值。 不能将其与 <strong>ForceWildcardHandling</strong> 组合使用。</p>\n","name":"DisableWildcardHandling","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>指定控制台文件夹的路径。 例如，<code>DeviceCollection\\Folder1</code></p>\n","isRequired":true,"name":"FolderPath","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>此参数处理通配符，并可能导致意外行为， (不建议) 。 不能将其与 <strong>DisableWildcardHandling</strong> 组合使用。</p>\n","name":"ForceWildcardHandling","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"FolderGuid","defaultValue":"None","description":"<p>指定控制台文件夹的 GUID。</p>\n","isRequired":true,"name":"Guid","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">Guid</span>\n"},{"aliases":"ContainerNodeID","defaultValue":"None","description":"<p>指定控制台文件夹的 ID。</p>\n","isRequired":true,"name":"Id","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">Int32</span>\n"},{"aliases":"ParentContainerNode","defaultValue":"None","description":"<p>为父容器指定文件夹对象。</p>\n","name":"InputObject","parameterValueGroup":"","pipelineInput":true,"position":"Named","type":"<span class=\"no-loc xref\">IResultObject</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>将此参数设置为 <code>$true</code> 以按空文件夹筛选结果。</p>\n","name":"IsEmpty","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">Boolean</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>将此参数设置为 以 <code>$true</code> 按搜索文件夹筛选结果。</p>\n","name":"IsSearchFolder","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">Boolean</span>\n"},{"acceptWildcardCharacters":true,"aliases":"","defaultValue":"None","description":"<p>指定控制台文件夹的名称。</p>\n","name":"Name","parameterValueGroup":"","position":"0","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>指定父文件夹的路径。</p>\n","name":"ParentFolderPath","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"SourceSite","defaultValue":"None","description":"<p>为站点指定三个字符的代码。</p>\n","name":"SiteCode","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"ObjectTypeName","defaultValue":"None","description":"<p>指定用于筛选结果的类型。 例如：</p>\n<ul>\n<li><code>SMS_Collection_Device</code></li>\n<li><code>SMS_Package</code></li>\n<li><code>SMS_Driver</code></li>\n</ul>\n","name":"TypeName","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"}],"schema":"PowershellCmdlet","summary":"<p>在控制台中获取一个或多个文件夹。</p>\n","syntaxes":["Get-CMFolder [[-Name] <String>] [-InputObject <IResultObject>] [-ParentFolderPath <String>]\n [-TypeName <String>] [-IsEmpty <Boolean>] [-IsSearchFolder <Boolean>] [-SiteCode <String>]\n [-DisableWildcardHandling] [-ForceWildcardHandling] [<CommonParameters>]","Get-CMFolder -Id <Int32> [-DisableWildcardHandling] [-ForceWildcardHandling] [<CommonParameters>]","Get-CMFolder -Guid <Guid> [-DisableWildcardHandling] [-ForceWildcardHandling] [<CommonParameters>]","Get-CMFolder -FolderPath <String> [-DisableWildcardHandling] [-ForceWildcardHandling] [<CommonParameters>]"],"uid":"ConfigurationManager.Get-CMFolder","hideEdit":true,"ms.translationtype":"MT","ms.contentlocale":"zh-cn","loc_version":"2024-08-21T21:18:36.7205003Z","loc_source_id":"Github-72476255#live","loc_file_id":"Github-72476255.live.MSDN.sccm-powershell.sccm-ps/ConfigurationManager/Get-CMFolder.md","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/get-cmfolder","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"Get-CMFolder","schemaType":"PowershellCmdlet","summary":"<p>在控制台中获取一个或多个文件夹。</p>\n","uid":"ConfigurationManager.Get-CMFolder"}],"canonical_url":"https://learn.microsoft.com/zh-cn/powershell/module/configurationmanager/get-cmfolder?view=sccm-ps","_op_canonicalUrl":"https://learn.microsoft.com/zh-cn/powershell/module/configurationmanager/get-cmfolder?view=sccm-ps"},"pageMetadata":"<meta name=\"description\" content=\"<p>使用此 cmdlet 可从指定的父路径获取所有自定义文件夹或文件夹。</p>\n<div class=&quot;NOTE&quot;>\n<p>注意</p>\n<p>从 Configuration Manager 站点驱动器运行 Configuration Manager cmdlet，例如 <code>PS XYZ:\\&amp;gt;</code>。 有关详细信息，请参阅 <a href=&quot;/powershell/sccm/overview&quot;>入门</a>。</p>\n</div>\n\" />\r\n<meta name=\"hideEdit\" content=\"true\" />\r\n<meta name=\"loc_file_id\" content=\"Github-72476255.live.MSDN.sccm-powershell.sccm-ps/ConfigurationManager/Get-CMFolder.md\" />\r\n<meta name=\"loc_source_id\" content=\"Github-72476255#live\" />\r\n<meta name=\"loc_version\" content=\"2024-08-21T21:18:36.7205003Z\" />\r\n<meta name=\"module\" content=\"ConfigurationManager\" />\r\n<meta name=\"ms.contentlocale\" content=\"zh-cn\" />\r\n<meta name=\"ms.translationtype\" content=\"MT\" />\r\n<meta name=\"name\" content=\"Get-CMFolder\" />\r\n<meta name=\"notes\" content=\"<p>有关此返回对象及其属性的详细信息，请参阅 <a href=&quot;/mem/configmgr/develop/reference/core/servers/console/sms_objectcontainernode-server-wmi-class&quot;>SMS_ObjectContainerNode服务器 WMI 类</a>。</p>\n\" />\r\n<meta name=\"schema\" content=\"PowershellCmdlet\" />\r\n<meta name=\"summary\" content=\"<p>在控制台中获取一个或多个文件夹。</p>\n\" />\r\n<meta name=\"syntaxes\" content=\"Get-CMFolder [[-Name] <String>] [-InputObject <IResultObject>] [-ParentFolderPath <String>]\n [-TypeName <String>] [-IsEmpty <Boolean>] [-IsSearchFolder <Boolean>] [-SiteCode <String>]\n [-DisableWildcardHandling] [-ForceWildcardHandling] [<CommonParameters>]\" />\r\n<meta name=\"syntaxes\" content=\"Get-CMFolder -Id <Int32> [-DisableWildcardHandling] [-ForceWildcardHandling] [<CommonParameters>]\" />\r\n<meta name=\"syntaxes\" content=\"Get-CMFolder -Guid <Guid> [-DisableWildcardHandling] [-ForceWildcardHandling] [<CommonParameters>]\" />\r\n<meta name=\"syntaxes\" content=\"Get-CMFolder -FolderPath <String> [-DisableWildcardHandling] [-ForceWildcardHandling] [<CommonParameters>]\" />\r\n<meta name=\"uid\" content=\"ConfigurationManager.Get-CMFolder\" />\r\n","themesRelativePathToOutputRoot":"_themes/"}