-
Notifications
You must be signed in to change notification settings - Fork 0
AzDoGroupMember
Michael Zanatta edited this page Aug 19, 2026
·
4 revisions
AzDoGroupMember [string] #ResourceName
{
GroupName = [String]$GroupName # [ProjectName|OrganizationName]\GroupName
# For GroupMember Syntax, refer to # GroupMembers Syntax
[ GroupMembers = [String[]]$GroupMembers ]
[ Ensure = [String] {'Present', 'Absent'} ]
}{
GroupMember = [String]$GroupMemberName # [ProjectName|OrganizationName]\GroupName
}The following string represents the service accounts for the project collection in Azure DevOps Organization:
[ProjectName|AZDOOrganizationName]\Project Collection Service Accounts
- [ProjectName|AZDOOrganizationName]: The AzDO Project or Organizational Name.
- Project Collection Service Accounts: The Group Member Name. This can be a Group Name, Service Principal Name or Service Principle.
If your Azure DevOps Organization name is MyOrg, the string would look like:
[MyOrg]\Project Collection Service Accounts
Common Properties:
- GroupName: The name of the Azure DevOps group.
- GroupMembers: An array of members to be included in the Azure DevOps group.
- Ensure: Specifies whether the group membership should be applied. Defaults to 'Present'.
This resource is used to manage Azure DevOps group memberships using Desired State Configuration (DSC). It allows you to define the properties of an Azure DevOps group and ensures that the group is configured according to those properties.
Configuration ExampleConfig {
Import-DscResource -ModuleName 'AzDevOpsDsc'
Node localhost {
AzDoGroupMember GroupExample {
GroupName = 'MySampleGroup'
GroupMembers = @('user1@example.com', 'user2@example.com')
}
}
}
ExampleConfig
Start-DscConfiguration -Path ./ExampleConfig -Wait -Verbose# Return the current configuration for AzDoGroupMember
$properties = @{
GroupName = 'MySampleGroup'
GroupMembers = @('user1@example.com', 'user2@example.com')
}
Invoke-DSCResource -Name 'AzDoGroupMember' -Method Get -Property $properties -ModuleName 'AzureDevOpsDscNative'# Remove the Azure DevOps Group and ensure that it is not recreated.
$properties = @{
GroupName = 'MySampleGroup'
Ensure = 'Absent'
}
Invoke-DSCResource -Name 'AzDoGroupMember' -Method Set -Property $properties -ModuleName 'AzureDevOpsDscNative'parameters: {}
variables: {
GroupName: SampleGroup,
GroupMembers: ['user1@example.com', 'user2@example.com']
}
resources:
- name: Group
type: AzureDevOpsDscNative/AzDoGroupMember
properties:
groupName: $GroupName
groupMembers: $GroupMembers$params = @{
AzureDevopsOrganizationName = "SampleAzDoOrgName"
ConfigurationDirectory = "C:\Datum\DSCOutput\"
ConfigurationUrl = 'https://configuration-path'
JITToken = 'SampleJITToken'
Mode = 'Set'
AuthenticationType = 'ManagedIdentity'
ReportPath = 'C:\Datum\DSCOutput\Reports'
}
Invoke-DscPipelineRunner @params- Assert-BoundParameter
- Assert-ElevatedUser
- Assert-IPAddress
- Assert-Module
- AzDoAPI_0_ProjectCache
- AzDoAPI_1_GroupCache
- AzDoAPI_2_UserCache
- AzDoAPI_3_GroupMemberCache
- AzDoAPI_4_GitRepositoryCache
- AzDoAPI_5_PermissionsCache
- AzDoAPI_6_ServicePrinciple
- AzDoAPI_7_IdentitySubjectDescriptors
- AzDoAPI_8_ProjectProcessTemplates
- AzDoAPI_9_DevOpsClassificationNodes
- Compare-DscParameterState
- Compare-ResourcePropertyState
- ConvertFrom-DscResourceInstance
- ConvertTo-Base64String
- ConvertTo-CimInstance
- ConvertTo-HashTable
- Find-Certificate
- Format-Path
- Get-AzDevOpsOperation
- Get-AzDevOpsServicesApiUri
- Get-AzDevOpsServicesUri
- AzDoAgentPool
- AzDoAgentPoolPermission
- AzDoAgentQueue
- AzDoAreaNodes
- AzDoAreaPermission
- AzDoArtifactFeed
- AzDoArtifactFeedPermission
- AzDoArtifactFeedSettings
- AzDoArtifactFeedView
- AzDoAuditStream
- AzDoBranchPolicy
- AzDoCheckConfiguration
- AzDoDeploymentGroup
- AzDoEnvironmentApproval
- AzDoEnvironmentPermission
- AzDoExtension
- AzDoGitPermission
- AzDoGitRepository
- AzDoGroupMember
- AzDoGroupPermission
- AzDoIterationNodes
- AzDoIterationPermission
- AzDoNotificationSubscription
- AzDoOrganizationGroup
- AzDoOrganizationSettings
- AzDoPipeline
- AzDoPipelineEnvironment
- AzDoPipelinePermission
- AzDoPipelineSettings
- AzDoProcess
- AzDoProcessPermission
- AzDoProject
- AzDoProjectGroup
- AzDoProjectPermission
- AzDoProjectServices
- AzDoRepositorySettings
- AzDoSecurityNamespacePermission
- AzDoServiceConnection
- AzDoServiceConnectionPermission
- AzDoServiceHook
- AzDoTaskGroup
- AzDoTeam
- AzDoTeamMember
- AzDoTeamSettings
- AzDoUserEntitlement
- AzDoVariableGroup
- AzDoVariableGroupPermission
- AzDoWiki
- AzDoWIPTags