Skip to content

Commit

Permalink
Adding a few examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
DarqueWarrior committed Aug 6, 2019
1 parent f65b6ab commit f454a22
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 12 deletions.
10 changes: 10 additions & 0 deletions .docs/Add-VSTeamMembership.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------

```PowerShell
PS C:\> $user = Get-VSTeamUser | ? DisplayName -eq 'Test User'
PS C:\> $group = Get-VSTeamGroup | ? DisplayName -eq 'Endpoint Administrators'
PS C:\> Add-VSTeamMembership -MemberDescriptor $user.Descriptor -ContainerDescriptor $group.Descriptor
```

Adds Test User to the Endpoint Administrators group.

## PARAMETERS

<!-- #include "./params/memberDescriptor.md" -->
Expand Down
8 changes: 8 additions & 0 deletions .docs/Get-VSTeamGroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------

```PowerShell
PS C:\> $group = Get-VSTeamGroup | ? DisplayName -eq 'Endpoint Administrators'
```

Assigns Endpoint Administrators group to $group variable.

## PARAMETERS

<!-- #include "./params/projectName.md" -->
Expand Down
6 changes: 4 additions & 2 deletions .docs/Get-VSTeamMembership.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@
<!-- #include "./synopsis/Get-VSTeamMembership.md" -->

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------

```PowerShell
(Get-VSTeamMembership -MemberDescriptor $user.ID).value | % { Get-VSTeamGroup -Descriptor $_.containerdescriptor }
(Get-VSTeamMembership -MemberDescriptor $user.ID).value | % { Get-VSTeamGroup -Descriptor $_.containerDescriptor }
```

Get all the groups for a user

### -------------------------- EXAMPLE 2 --------------------------

```PowerShell
(Get-VSTeamMembership -ContainerDescriptor $group.id).value | % {Get-VSTeamUser -Descriptor $_.memberDescriptor }
```
Expand Down Expand Up @@ -55,7 +58,6 @@ Position: 0
## OUTPUTS
## NOTES
## RELATED LINKS
Expand Down
10 changes: 10 additions & 0 deletions .docs/Remove-VSTeamMembership.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------

```PowerShell
PS C:\> $user = Get-VSTeamUser | ? DisplayName -eq 'Test User'
PS C:\> $group = Get-VSTeamGroup | ? DisplayName -eq 'Endpoint Administrators'
PS C:\> Remove-VSTeamMembership -MemberDescriptor $user.Descriptor -ContainerDescriptor $group.Descriptor
```

Removes Test User from the Endpoint Administrators group.

## PARAMETERS

<!-- #include "./params/memberDescriptor.md" -->
Expand Down
3 changes: 2 additions & 1 deletion .docs/Test-VSTeamMembership.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
## INPUTS

## OUTPUTS
### $True or $False

### System.Boolean

## NOTES

Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ Updated help to refer to Add-VSTeamProfile instead of Set-VSTeamProfile
Added support for Get-VSTeamJobRequest. The provider was extended to show the Job Request under the Agent.

- Account
- Agent Pools
- Pool1
- Agent1
- JobRequest1
- Agent Pools
- Pool1
- Agent1
- JobRequest1

## 6.2.7

Expand Down
4 changes: 2 additions & 2 deletions Source/en-US/VSTeam-Help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9240,7 +9240,7 @@ ID Title Status
<command:examples>
<command:example>
<maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
<dev:code>(Get-VSTeamMembership -MemberDescriptor $user.ID).value | % { Get-VSTeamGroup -Descriptor $_.containerdescriptor }</dev:code>
<dev:code>(Get-VSTeamMembership -MemberDescriptor $user.ID).value | % { Get-VSTeamGroup -Descriptor $_.containerDescriptor }</dev:code>
<dev:remarks>
<maml:para>Get all the groups for a user</maml:para>
</dev:remarks>
Expand Down Expand Up @@ -17937,7 +17937,7 @@ PS demo:\&gt; Get-ChildItem</dev:code>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name>$True or $False</maml:name>
<maml:name>System.Boolean</maml:name>
</dev:type>
<maml:description>
<maml:para></maml:para>
Expand Down
6 changes: 4 additions & 2 deletions docs/Get-VSTeamMembership.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ Gets a memberships for a container or member.
Gets a memberships for a container or member.

## EXAMPLES

### -------------------------- EXAMPLE 1 --------------------------

```PowerShell
(Get-VSTeamMembership -MemberDescriptor $user.ID).value | % { Get-VSTeamGroup -Descriptor $_.containerdescriptor }
(Get-VSTeamMembership -MemberDescriptor $user.ID).value | % { Get-VSTeamGroup -Descriptor $_.containerDescriptor }
```

Get all the groups for a user

### -------------------------- EXAMPLE 2 --------------------------

```PowerShell
(Get-VSTeamMembership -ContainerDescriptor $group.id).value | % {Get-VSTeamUser -Descriptor $_.memberDescriptor }
```
Expand Down Expand Up @@ -56,7 +59,6 @@ Position: 0
## OUTPUTS
## NOTES
## RELATED LINKS
Expand Down
3 changes: 2 additions & 1 deletion docs/Test-VSTeamMembership.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Position: 1
## INPUTS
## OUTPUTS
### $True or $False
### System.Boolean
## NOTES
Expand Down

0 comments on commit f454a22

Please sign in to comment.