Skip to content

Commit 5fbe18f

Browse files
authored
Merge pull request #6436 from aczechowski/cz-2111cb-powershell
2111 CB PowerShell
2 parents e4687fb + 075ac29 commit 5fbe18f

7 files changed

Lines changed: 217 additions & 22 deletions

File tree

memdocs/configmgr/apps/deploy-use/create-deploy-scripts.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Create and run scripts
33
titleSuffix: Configuration Manager
44
description: Create and run PowerShell scripts on client devices.
5-
ms.date: 04/30/2020
5+
ms.date: 12/28/2021
66
ms.prod: configuration-manager
77
ms.technology: configmgr-app
88
ms.topic: conceptual
@@ -328,6 +328,18 @@ Microsoft Windows 10 Enterprise
328328
- On the site server, by default in C:\Program Files\Configuration Manager\Logs:
329329
- **SMS_Message_Processing_Engine.log**
330330

331+
## Automate with Windows PowerShell
332+
333+
You can use the following PowerShell cmdlets to automate some of these tasks:
334+
335+
- [Approve-CMScript](/powershell/module/configurationmanager/approve-cmscript)
336+
- [Deny-CMScript](/powershell/module/configurationmanager/deny-cmscript)
337+
- [Get-CMScript](/powershell/module/configurationmanager/get-cmscript)
338+
- [Invoke-CMScript](/powershell/module/configurationmanager/invoke-cmscript)
339+
- [New-CMScript](/powershell/module/configurationmanager/new-cmscript)
340+
- [Remove-CMScript](/powershell/module/configurationmanager/remove-cmscript)
341+
- [Set-CMScript](/powershell/module/configurationmanager/set-cmscript)
342+
331343
## See Also
332344

333345
- [Configure role-based administration for Configuration Manager](../../core/servers/deploy/configure/configure-role-based-administration.md)

memdocs/configmgr/apps/deploy-use/revise-and-supersede-applications.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Revise and supersede applications
33
titleSuffix: Configuration Manager
44
description: Learn how to work with Configuration Manager application versions and supersede applications.
5-
ms.date: 11/24/2020
5+
ms.date: 12/16/2021
66
ms.prod: configuration-manager
77
ms.technology: configmgr-app
88
ms.topic: how-to
@@ -128,6 +128,13 @@ The end result is that all deployments of the main application use the new depen
128128

129129
This action shows a graphical diagram of the relationships of the selected application to other applications. For the supersedence relationships, it shows applications that the selected application supersedes, and applications that the selected application is superseded by.
130130

131+
### Manage supersedence with PowerShell
132+
133+
You can add, view, and remove supersedence relationships using the following PowerShell cmdlets:
134+
135+
- [Get-CMDeploymentTypeSupersedence](/powershell/module/configurationmanager/get-cmdeploymenttypesupersedence)
136+
- [Set-CMApplicationSupersedence](/powershell/module/configurationmanager/set-cmapplicationsupersedence)
137+
131138
## Next steps
132139

133140
[Uninstall applications](uninstall-applications.md)

memdocs/configmgr/core/clients/manage/collections/manage-collections.md

Lines changed: 83 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -272,35 +272,102 @@ Other improvements:
272272
273273
For more information on how to navigate the collection dependency graph with a keyboard, see [Accessibility features](../../../understand/accessibility-features.md#collection-relationship-diagram-shortcuts).
274274

275-
## PowerShell
275+
## Automate with Windows PowerShell
276276

277-
You can also use PowerShell to manage collections. For more information, see the following articles:
277+
You can use the following PowerShell cmdlets to manage collections:
278+
279+
### Generic cmdlets for all collection types
280+
281+
#### Basic cmdlets
278282

279283
- [Get-CMCollection](/powershell/module/configurationmanager/get-cmcollection)
280-
- [Set-CMCollection](/powershell/module/configurationmanager/set-cmcollection)
281284
- [New-CMCollection](/powershell/module/configurationmanager/new-cmcollection)
282-
- [Copy-CMCollection](/powershell/module/configurationmanager/copy-cmcollection)
283285
- [Remove-CMCollection](/powershell/module/configurationmanager/remove-cmcollection)
284-
- [Import-CMCollection](/powershell/module/configurationmanager/import-cmcollection)
286+
- [Set-CMCollection](/powershell/module/configurationmanager/set-cmcollection)
287+
288+
#### Other actions
289+
290+
- [Copy-CMCollection](/powershell/module/configurationmanager/copy-cmcollection)
285291
- [Export-CMCollection](/powershell/module/configurationmanager/export-cmcollection)
286292
- [Get-CMCollectionMember](/powershell/module/configurationmanager/get-cmcollectionmember)
287293
- [Get-CMCollectionSetting](/powershell/module/configurationmanager/get-cmcollectionsetting)
294+
- [Import-CMCollection](/powershell/module/configurationmanager/import-cmcollection)
288295
- [Invoke-CMCollectionUpdate](/powershell/module/configurationmanager/invoke-cmcollectionupdate)
289-
- [Add-CMCollectionMembershipRule](/powershell/module/configurationmanager/add-cmcollectionmembershiprule)
290-
- [Set-CMCollectionPowerManagement](/powershell/module/configurationmanager/set-cmcollectionpowermanagement)
291-
- [Get-CMCollectionMembershipRule](/powershell/module/configurationmanager/get-cmcollectionmembershiprule)
292-
- [Remove-CMCollectionMembershipRule](/powershell/module/configurationmanager/remove-cmcollectionmembershiprule)
296+
297+
#### Get membership rules
298+
293299
- [Get-CMCollectionDirectMembershipRule](/powershell/module/configurationmanager/get-cmcollectiondirectmembershiprule)
294-
- [Get-CMCollectionQueryMembershipRule](/powershell/module/configurationmanager/get-cmcollectionquerymembershiprule)
300+
- [Get-CMCollectionExcludeMembershipRule](/powershell/module/configurationmanager/get-cmcollectionexcludemembershiprule)
295301
- [Get-CMCollectionIncludeMembershipRule](/powershell/module/configurationmanager/get-cmcollectionincludemembershiprule)
296-
- [Add-CMCollectionToAdministrativeUser](/powershell/module/configurationmanager/add-cmcollectiontoadministrativeuser)
297-
- [Remove-CMCollectionQueryMembershipRule](/powershell/module/configurationmanager/remove-cmcollectionquerymembershiprule)
302+
- [Get-CMCollectionQueryMembershipRule](/powershell/module/configurationmanager/get-cmcollectionquerymembershiprule)
303+
304+
#### Remove membership rules
305+
298306
- [Remove-CMCollectionDirectMembershipRule](/powershell/module/configurationmanager/remove-cmcollectiondirectmembershiprule)
299-
- [Get-CMCollectionExcludeMembershipRule](/powershell/module/configurationmanager/get-cmcollectionexcludemembershiprule)
300-
- [Add-CMCollectionToDistributionPointGroup](/powershell/module/configurationmanager/add-cmcollectiontodistributionpointgroup)
301-
- [Remove-CMCollectionIncludeMembershipRule](/powershell/module/configurationmanager/remove-cmcollectionincludemembershiprule)
302307
- [Remove-CMCollectionExcludeMembershipRule](/powershell/module/configurationmanager/remove-cmcollectionexcludemembershiprule)
303-
- [Remove-CMCollectionFromAdministrativeUser](/powershell/module/configurationmanager/remove-cmcollectionfromadministrativeuser)
308+
- [Remove-CMCollectionIncludeMembershipRule](/powershell/module/configurationmanager/remove-cmcollectionincludemembershiprule)
309+
- [Remove-CMCollectionQueryMembershipRule](/powershell/module/configurationmanager/remove-cmcollectionquerymembershiprule)
310+
311+
### Device collection-specific cmdlets
312+
313+
#### Basic actions for device collections
314+
315+
- [Get-CMDeviceCollection](/powershell/module/configurationmanager/get-cmdevicecollection)
316+
- [New-CMDeviceCollection](/powershell/module/configurationmanager/new-cmdevicecollection)
317+
318+
#### Device collection variables
319+
320+
- [Get-CMDeviceCollectionVariable](/powershell/module/configurationmanager/get-cmdevicecollectionvariable)
321+
- [New-CMDeviceCollectionVariable](/powershell/module/configurationmanager/new-cmdevicecollectionvariable)
322+
- [Remove-CMDeviceCollectionVariable](/powershell/module/configurationmanager/remove-cmdevicecollectionvariable)
323+
- [Set-CMDeviceCollectionVariable](/powershell/module/configurationmanager/set-cmdevicecollectionvariable)
324+
325+
#### Add device collection membership rules
326+
327+
- [Add-CMDeviceCollectionDirectMembershipRule](/powershell/module/configurationmanager/add-cmdevicecollectiondirectmembershiprule)
328+
- [Add-CMDeviceCollectionExcludeMembershipRule](/powershell/module/configurationmanager/add-cmdevicecollectionexcludemembershiprule)
329+
- [Add-CMDeviceCollectionIncludeMembershipRule](/powershell/module/configurationmanager/add-cmdevicecollectionincludemembershiprule)
330+
- [Add-CMDeviceCollectionQueryMembershipRule](/powershell/module/configurationmanager/add-cmdevicecollectionquerymembershiprule)
331+
332+
#### Get device collection membership rules
333+
334+
- [Get-CMDeviceCollectionDirectMembershipRule](/powershell/module/configurationmanager/get-cmdevicecollectiondirectmembershiprule)
335+
- [Get-CMDeviceCollectionExcludeMembershipRule](/powershell/module/configurationmanager/get-cmdevicecollectionexcludemembershiprule)
336+
- [Get-CMDeviceCollectionIncludeMembershipRule](/powershell/module/configurationmanager/get-cmdevicecollectionincludemembershiprule)
337+
- [Get-CMDeviceCollectionQueryMembershipRule](/powershell/module/configurationmanager/get-cmdevicecollectionquerymembershiprule)
338+
339+
#### Remove device collection membership rules
340+
341+
- [Remove-CMDeviceCollectionDirectMembershipRule](/powershell/module/configurationmanager/remove-cmdevicecollectiondirectmembershiprule)
342+
- [Remove-CMDeviceCollectionExcludeMembershipRule](/powershell/module/configurationmanager/remove-cmdevicecollectionexcludemembershiprule)
343+
- [Remove-CMDeviceCollectionIncludeMembershipRule](/powershell/module/configurationmanager/remove-cmdevicecollectionincludemembershiprule)
344+
- [Remove-CMDeviceCollectionQueryMembershipRule](/powershell/module/configurationmanager/remove-cmdevicecollectionquerymembershiprule)
345+
346+
### User collection-specific cmdlets
347+
348+
- [Get-CMUserCollection](/powershell/module/configurationmanager/get-cmusercollection)
349+
- [New-CMUserCollection](/powershell/module/configurationmanager/new-cmusercollection)
350+
351+
#### Add user collection membership rules
352+
353+
- [Add-CMUserCollectionDirectMembershipRule](/powershell/module/configurationmanager/add-cmusercollectiondirectmembershiprule)
354+
- [Add-CMUserCollectionExcludeMembershipRule](/powershell/module/configurationmanager/add-cmusercollectionexcludemembershiprule)
355+
- [Add-CMUserCollectionIncludeMembershipRule](/powershell/module/configurationmanager/add-cmusercollectionincludemembershiprule)
356+
- [Add-CMUserCollectionQueryMembershipRule](/powershell/module/configurationmanager/add-cmusercollectionquerymembershiprule)
357+
358+
#### Get user collection membership rules
359+
360+
- [Get-CMUserCollectionDirectMembershipRule](/powershell/module/configurationmanager/get-cmusercollectiondirectmembershiprule)
361+
- [Get-CMUserCollectionExcludeMembershipRule](/powershell/module/configurationmanager/get-cmusercollectionexcludemembershiprule)
362+
- [Get-CMUserCollectionIncludeMembershipRule](/powershell/module/configurationmanager/get-cmusercollectionincludemembershiprule)
363+
- [Get-CMUserCollectionQueryMembershipRule](/powershell/module/configurationmanager/get-cmusercollectionquerymembershiprule)
364+
365+
#### Remove user collection membership rules
366+
367+
- [Remove-CMUserCollectionDirectMembershipRule](/powershell/module/configurationmanager/remove-cmusercollectiondirectmembershiprule)
368+
- [Remove-CMUserCollectionExcludeMembershipRule](/powershell/module/configurationmanager/remove-cmusercollectionexcludemembershiprule)
369+
- [Remove-CMUserCollectionIncludeMembershipRule](/powershell/module/configurationmanager/remove-cmusercollectionincludemembershiprule)
370+
- [Remove-CMUserCollectionQueryMembershipRule](/powershell/module/configurationmanager/remove-cmusercollectionquerymembershiprule)
304371

305372
## Next steps
306373

memdocs/configmgr/core/servers/deploy/configure/configure-role-based-administration.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Configure role-based administration
33
titleSuffix: Configuration Manager
44
description: Combine security roles, security scopes, and assigned collections to define the administrative scope for each administrative user.
5-
ms.date: 04/15/2021
5+
ms.date: 12/21/2021
66
ms.prod: configuration-manager
77
ms.technology: configmgr-core
88
ms.topic: how-to
@@ -283,6 +283,51 @@ Use the following procedure to modify an administrative user that has the secura
283283
> [!CAUTION]
284284
> When a security role grants administrative users the collection deployment permission, those administrative users can distribute objects from any security scope for which they have object **read** permissions, even if that security scope is associated with a different security role.
285285
286+
## Automate with Windows PowerShell
287+
288+
You can use the following PowerShell cmdlets to automate some of these tasks:
289+
290+
Manage administrative users:
291+
292+
- [Get-CMAdministrativeUser](/powershell/module/configurationmanager/Get-CMAdministrativeUser): Get an administrative user object.
293+
- [New-CMAdministrativeUser](/powershell/module/configurationmanager/New-CMAdministrativeUser): Create a new administrative user.
294+
- [New-CMAdministrativeUserPermission](/powershell/module/configurationmanager/New-CMAdministrativeUserPermission): {{ Fill in the Synopsis }}
295+
- [Remove-CMAdministrativeUser](/powershell/module/configurationmanager/Remove-CMAdministrativeUser): Remove an administrative user.
296+
297+
Manage roles and scopes on users:
298+
299+
- [Add-CMSecurityRoleToAdministrativeUser](/powershell/module/configurationmanager/Add-CMSecurityRoleToAdministrativeUser): Add a security role to a user or group.
300+
- [Remove-CMSecurityRoleFromAdministrativeUser](/powershell/module/configurationmanager/Remove-CMSecurityRoleFromAdministrativeUser): Remove the association between a security role and an administrative user.
301+
- [Add-CMSecurityScopeToAdministrativeUser](/powershell/module/configurationmanager/Add-CMSecurityScopeToAdministrativeUser): Add a security scope to a user or group.
302+
- [Remove-CMSecurityScopeFromAdministrativeUser](/powershell/module/configurationmanager/Remove-CMSecurityScopeToAdministrativeUser): Remove the association between a security scope and an administrative user.
303+
304+
Manage security roles:
305+
306+
- [Copy-CMSecurityRole](/powershell/module/configurationmanager/Copy-CMSecurityRole): Create a custom security role.
307+
- [Export-CMSecurityRole](/powershell/module/configurationmanager/Export-CMSecurityRole): Export a security role to an XML file.
308+
- [Get-CMSecurityRole](/powershell/module/configurationmanager/Get-CMSecurityRole): Get a security role.
309+
- [Import-CMSecurityRole](/powershell/module/configurationmanager/Import-CMSecurityRole): Import a security role from an XML file.
310+
- [Remove-CMSecurityRole](/powershell/module/configurationmanager/Remove-CMSecurityRole): Remove custom security roles.
311+
- [Set-CMSecurityRole](/powershell/module/configurationmanager/Set-CMSecurityRole): Change configuration settings of a security role.
312+
313+
Manage permissions on security roles:
314+
315+
- [Get-CMSecurityRolePermission](/powershell/module/configurationmanager/Get-CMSecurityRolePermission): Get the permissions for a security role.
316+
- [Set-CMSecurityRolePermission](/powershell/module/configurationmanager/Set-CMSecurityRolePermission): Configure a security role with specific permissions.
317+
318+
Manage security scopes:
319+
320+
- [Get-CMSecurityScope](/powershell/module/configurationmanager/Get-CMSecurityScope): Get a security scope.
321+
- [New-CMSecurityScope](/powershell/module/configurationmanager/New-CMSecurityScope): Create a security scope.
322+
- [Remove-CMSecurityScope](/powershell/module/configurationmanager/Remove-CMSecurityScope): Remove a security scope.
323+
- [Set-CMSecurityScope](/powershell/module/configurationmanager/Set-CMSecurityScope): Configure a security scope.
324+
325+
Manage object security scope:
326+
327+
- [Add-CMObjectSecurityScope](/powershell/module/configurationmanager/Add-CMObjectSecurityScope): Add a security scope to an object.
328+
- [Get-CMObjectSecurityScope](/powershell/module/configurationmanager/Get-CMObjectSecurityScope): Get the security scope for a Configuration Manager object.
329+
- [Remove-CMObjectSecurityScope](/powershell/module/configurationmanager/Remove-CMObjectSecurityScope): Remove a security scope from a Configuration Manager object.
330+
286331
## Next steps
287332

288333
[Role-based administration and auditing tool](../../../support/rbaviewer.md)

memdocs/configmgr/core/servers/deploy/configure/site-components.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Site components
33
titleSuffix: Configuration Manager
44
description: Learn how to configure site components to modify the behavior of site system roles and site status reporting.
5-
ms.date: 04/05/2021
5+
ms.date: 12/15/2021
66
ms.prod: configuration-manager
77
ms.technology: configmgr-core
88
ms.topic: conceptual
@@ -49,10 +49,24 @@ For more information, see [Use a pull-distribution point](../../../plan-design/h
4949

5050
For more information, see [Network access account](../../../plan-design/hierarchy/accounts.md#network-access-account).
5151

52+
#### Automate software distribution site component with PowerShell
53+
54+
To programmatically view and configure the **Software distribution** site component, use the following PowerShell cmdlets:
55+
56+
- [Get-CMSoftwareDistributionComponent](/powershell/module/configurationmanager/get-cmsoftwaredistributioncomponent)
57+
- [Set-CMSoftwareDistributionComponent](/powershell/module/configurationmanager/set-cmsoftwaredistributioncomponent)
58+
5259
### Software update point
5360

5461
For more information, see [Install a software update point](../../../../sum/get-started/install-a-software-update-point.md).
5562

63+
#### Automate software update point site component with PowerShell
64+
65+
To programmatically view and configure the **Software update point** site component, use the following PowerShell cmdlets:
66+
67+
- [Get-CMSoftwareUpdatePointComponent](/powershell/module/configurationmanager/get-cmsoftwareupdatepointcomponent)
68+
- [Set-CMSoftwareUpdatePointComponent](/powershell/module/configurationmanager/set-cmsoftwareupdatepointcomponent)
69+
5670
### OS deployment
5771

5872
For more information, see [Specify the drive for offline OS image servicing](../../../../osd/get-started/manage-operating-system-images.md#specify-the-drive-for-offline-os-image-servicing).
@@ -74,22 +88,50 @@ When clients on the intranet can't use Active Directory Domain Services to find
7488

7589
For general information about service location, see [Understand how clients find site resources and services](../../../plan-design/hierarchy/understand-how-clients-find-site-resources-and-services.md).
7690

91+
#### Automate management point site component with PowerShell
92+
93+
To programmatically view and configure the **Management point** site component, use the following PowerShell cmdlets:
94+
95+
- [Get-CMManagementPointComponent](/powershell/module/configurationmanager/get-cmmanagementpointcomponent)
96+
- [Set-CMManagementPointComponent](/powershell/module/configurationmanager/set-cmmanagementpointcomponent)
97+
7798
### Status reporting
7899

79100
These settings directly set up the level of detail that's included in status reports from sites and clients.
80101

102+
#### Automate status reporting site component with PowerShell
103+
104+
To programmatically view and configure the **Status reporting** site component, use the following PowerShell cmdlets:
105+
106+
- [Get-CMStatusReportingComponent](/powershell/module/configurationmanager/get-cmstatusreportingcomponent)
107+
- [Set-CMStatusReportingComponent](/powershell/module/configurationmanager/set-cmstatusreportingcomponent)
108+
81109
### Email notification
82110

83111
Specify account and email server details to enable Configuration Manager to send email notifications for alerts.
84112

85113
For more information, see [Configure alerts](../../manage/configure-alerts.md#configure-email-notification-for-alerts).
86114

115+
#### Automate email notification site component with PowerShell
116+
117+
To programmatically view and configure the **Email notification** site component, use the following PowerShell cmdlets:
118+
119+
- [Get-CMEmailNotificationComponent](/powershell/module/configurationmanager/get-cmemailnotificationcomponent)
120+
- [Set-CMEmailNotificationComponent](/powershell/module/configurationmanager/set-cmemailnotificationcomponent)
121+
87122
### <a name="bkmk_colleval"></a> Collection membership evaluation
88123

89124
Use this component to set how often collection membership is incrementally evaluated. Incremental evaluation updates a collection membership with only new or changed resources.
90125

91126
For more information, see [Best practices for collections](../../../clients/manage/collections/best-practices-for-collections.md).
92127

128+
#### Automate collection membership evaluation site component with PowerShell
129+
130+
To programmatically view and configure the **Collection membership evaluation** site component, use the following PowerShell cmdlets:
131+
132+
- [Get-CMCollectionMembershipEvaluationComponent](/powershell/module/configurationmanager/get-cmcollectionmembershipevaluationcomponent)
133+
- [Set-CMCollectionMembershipEvaluationComponent](/powershell/module/configurationmanager/set-cmcollectionmembershipevaluationcomponent)
134+
93135
## Configuration Manager Service Manager
94136

95137
You can use the Service Manager to control Configuration Manager services, and to view the status of any Configuration Manager service or working thread. These services and threads are referred to collectively as Configuration Manager components.

0 commit comments

Comments
 (0)