Listen.psm1
function Add-ListenElement { param( [Parameter(Mandatory, ValueFromPipeline, Position = 0)] $ElementUid, [Parameter(Mandatory)] $ListeUid ) process{ $Body = New-Object PSCustomObject; $Body | Add-Member -MemberType NoteProperty -Name "Entitaeten" -Value ([array]($ElementUid | ConvertTo-WeeduGuid)); Invoke-Weedu -Uri "rest/Listen/{0}/add" -UriParams @($ListeUid | ConvertTo-WeeduGuid) -Method PUT -Body $Body; } } function Remove-ListenElement { param( [Parameter(Mandatory, ValueFromPipeline, Position = 0)] $ElementUid, [Parameter(Mandatory)] $ListeUid ) process{ $Body = New-Object PSCustomObject; $Body | Add-Member -MemberType NoteProperty -Name "Entitaeten" -Value ([array]($ElementUid | ConvertTo-WeeduGuid)); Invoke-Weedu -Uri "rest/Listen/{0}/remove" -UriParams @($ListeUid | ConvertTo-WeeduGuid) -Method PUT -Body $Body; } } Export-ModuleMember -function Add-ListenElement Export-ModuleMember -function Remove-ListenElement |