To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit b364c7fc authored by Aurel Schwitter's avatar Aurel Schwitter

update help

parent 065d70fc
......@@ -87,10 +87,10 @@
PSData = @{
# Tags applied to this module. These help with module discovery in online galleries.
# Tags = @()
Tags = @("iam","ethz","PSEdition_Core","PSEdition_Desktop")
# A URL to the license for this module.
LicenseUri = 'https://gitlab.ethz.ch/aurels/iam-powershell/blob/master/LICENSE'
LicenseUri = 'https://gitlab.ethz.ch/aurels/iam-powershell/raw/master/LICENSE'
# A URL to the main website for this project.
ProjectUri = 'https://gitlab.ethz.ch/aurels/iam-powershell'
......@@ -106,7 +106,7 @@
} # End of PrivateData hashtable
# HelpInfo URI of this module
HelpInfoURI = 'https://gitlab.ethz.ch/aurels/iam-powershell/tree/master/docs'
HelpInfoURI = 'https://gitlab.ethz.ch/aurels/iam-powershell/raw/master/docs/IAMClient-help.xml'
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
......
......@@ -8,11 +8,12 @@ if (Get-Module IAMClient){
Import-Module "..\IAMClient.psd1" -Force
if ((Get-ChildItem ..\docs).Count -gt 0) {
Update-MarkdownHelpModule -Path ..\docs -RefreshModulePage -ModulePagePath ..\docs\README.md
Update-MarkdownHelp -Path ..\docs -Force
} else {
New-MarkdownHelp -Module IAMClient -OutputFolder "..\docs" -WithModulePage -ModulePagePath "..\docs\README.md" -Force
Remove-Item -Path ..\docs\*
}
New-MarkdownHelp -Module IAMClient -OutputFolder "..\docs" -WithModulePage -ModulePagePath "..\docs\README.md" -Force
New-ExternalHelp -Path ..\docs -OutputPath ..\docs
Update-MarkdownHelpModule -Path ..\docs -RefreshModulePage -ModulePagePath ..\docs\README.md
Update-MarkdownHelp -Path ..\docs -Force
$newLine = [System.Environment]::NewLine
......
This source diff could not be displayed because it is too large. You can view the blob instead.
---
Module Name: IAMClient
Module Guid: {{ Update Module Guid }}
Module Guid: 33ce3afe-9156-4f0e-bbc7-6d4fab3f2ad7
Download Help Link: {{ Update Download Link }}
Help Version: {{ Update Help Version }}
Locale: {{ Update Locale }}
Help Version: {{ Please enter version of help manually (X.X.X.X) format }}
Locale: en-US
---
# IAMClient Module
......@@ -95,9 +95,6 @@ Sets the members of an ETH group to the specified member list
### [Sync-ETHGroupMember](Sync-ETHGroupMember.md)
Synchronizes users from multiple groups and mailing lists to a group and a mailinglist
### [Sync-ETHMaillistMember](Sync-ETHMaillistMember.md)
Synchronizes members mailinglists (DEPRECATED)
### [Test-ETHCredentials](Test-ETHCredentials.md)
{{ Fill in the Synopsis }}
---
external help file: IAMClient-help.xml
Module Name: IAMClient
online version:
schema: 2.0.0
---
# Sync-ETHMaillistMember
## SYNOPSIS
Synchronizes members mailinglists (DEPRECATED)
## SYNTAX
```
Sync-ETHMaillistMember [-ReferenceLists] <String[]> [-SyncList] <String> [-AllowADFallback]
[<CommonParameters>]
```
## DESCRIPTION
Sync-ETHMaillist members can be used to emulate nesting without actually nesting groups
The members can be synchronized from other groups, f.ex OC-groups and no_oc-Groups
## EXAMPLES
### EXAMPLE 1
```
Sync-ETHMaillistMember -ReferenceLists "biol-micro-test-list" -SyncList "biol-micro-list-aebi"
```
This copies all members from the list "biol-micro-test-list" to the list "biol-micro-list-aebi"
### EXAMPLE 2
```
Sync-ETHMaillistMember -ReferenceLists "biol-micro-test-list","biol-isg-all" -SyncList "biol-micro-list-aebi"
```
This does the same as example 1, but with multiple sourcelists which will be combined
## PARAMETERS
### -ReferenceLists
The lists to get the members **from**
```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -SyncList
The destination list that will be **modified**
```yaml
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -AllowADFallback
Falls back to AD if group cannot be loaded via IAM
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
## INPUTS
## OUTPUTS
## NOTES
## RELATED LINKS
[Set-ETHMaillistMember
Set-ETHGroupMember
Sync-ETHGroupMember]()
# Connection Cmdlets
# Connection Cmdlets
......
# ETH Group Cmdlets
# ETH Group Cmdlets
......
# ETH Maillist Group
# ETH Maillist Group
......@@ -13,5 +13,4 @@ This group contains the following cmdlets:
- [Remove-ETHMaillist](/docs/Remove-ETHMaillist.md)
- [Remove-ETHMaillistMember](/docs/Remove-ETHMaillistMember.md)
- [Set-ETHMaillistMembers](/docs/Set-ETHMaillistMembers.md)
- [Sync-ETHMaillistMember](/docs/Sync-ETHMaillistMember.md)
function Sync-ETHMaillistMember {
<#
.SYNOPSIS
Synchronizes members mailinglists (DEPRECATED)
.DESCRIPTION
Sync-ETHMaillist members can be used to emulate nesting without actually nesting groups
The members can be synchronized from other groups, f.ex OC-groups and no_oc-Groups
.PARAMETER ReferenceLists
The lists to get the members **from**
.PARAMETER SyncList
The destination list that will be **modified**
.EXAMPLE
Sync-ETHMaillistMember -ReferenceLists "biol-micro-test-list" -SyncList "biol-micro-list-aebi"
This copies all members from the list "biol-micro-test-list" to the list "biol-micro-list-aebi"
.EXAMPLE
Sync-ETHMaillistMember -ReferenceLists "biol-micro-test-list","biol-isg-all" -SyncList "biol-micro-list-aebi"
This does the same as example 1, but with multiple sourcelists which will be combined
.LINK
Set-ETHMaillistMember
Set-ETHGroupMember
Sync-ETHGroupMember
#>
[CmdletBinding()]
param(
# Group Name
[Parameter(Position = 0, Mandatory = $true)]
[string[]]$ReferenceLists,
# Members to sync to
[Parameter(Position = 1, Mandatory = $true)]
[string]$SyncList,
# Falls back to AD if group cannot be loaded via IAM
[Parameter(Position = 2)]
[switch]$AllowADFallback
)
BEGIN {
# Check if client is initialized
Test-IsIAMClientInitialized | Out-Null
# Validate destination list exists
try {
$null = Get-ETHMaillist $SyncGroup # discard output
}
catch {
throw "Could not find maillist $ReferenceGroup or $SyncGroup"
}
}
PROCESS {
# Validate both groups exist
$AllMembersList = @()
foreach ($RefList in $ReferenceLists) {
try {
$List = Get-ETHMaillist $RefList
$AllMembersList += $List.members
}
catch {
# Perform fallback if needed
if (-not $AllowADFallback) {
throw "Could not find group $RefList in IAM"
}
try {
# get all users from AD group as fallback
$Members = Get-ADGroupMember -Identity $RefList | Where-Object objectClass -eq "user"
$AllMembersList += $Members.name
}
catch {
throw "Could not find group $RefList in AD"
}
}
}
Write-Debug "New Members: $AllMembersList"
return (Set-ETHMaillistMembers -Identity $SyncGroup -Members $AllMembersList)
}
}
\ No newline at end of file
# Person Cmdlets
# Person Cmdlets
......
# ETH User Cmdlets
# ETH User Cmdlets
......
# Initialization Cmdlets
# Initialization Cmdlets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment