Obtener notas de un grupo de distribución de Exchange

Obtener notas de un grupo de distribución de Exchange

Quiero crear un resumen para obtener las notas de un grupo de distribución específico y mostrarlas junto con el nombre y otra información del grupo de distribución. Lo busqué en Google y encontré diferentes fuentes con las mismas soluciones. Estas son las soluciones que encontré:

Get-DistributionGroup Head-of-Operations | Select-Object Name, GroupType, ManagedBy, @{Name="Notes";Expression={(Get-Group $_).Notes}}

Esta es una de las fuentes para esto:

https://richgski.blogspot.com/2012/03/powershell-get-exchange-distribution.html

Pero la Fila con las Notas siempre quedará en blanco y no sé por qué:

Name        GroupType ManagedBy Notes
----        --------- --------- -----
Head-of-Ops Universal {}

Cuando hago el siguiente comando por separado:

Get-Group Head-of-Ops | Select-Object Notes

... me está dando la nota correcta como salida:

Notes
-----
Owner- Paul J.

Ahora he jugado un poco más con él. El siguiente código funciona perfectamente:

$Result = Get-DistributionGroup Head-of-Operations
Get-Group $Result.Name | Select-Object Notes

Producción:

Notes
-----
Owner- Paul J.

Pero éste todavía no funciona. Se ejecuta sin ningún error, pero Notas sigue en blanco:

Get-DistributionGroup Head-of-Operations | Select-Object Name,GroupType,ManagedBy,@{Name="Notes";Expression={(Get-Group $_.Name | Select-Object Notes)}}

Producción:

Name        GroupType ManagedBy Notes
----        --------- --------- -----
Head-of-Ops Universal {}

Después de eso encontré otra publicación sobre este tema aquí: https://www.oxfordsbsguy.com/2014/04/21/exchange-powershell-how-to-enumerate-distribution-lists-managers-and-members/#comment-4452

Pero aún así, usando el siguiente comando:

Get-DistributionGroup Head-of-Ops | Select-Object Name,GroupType,ManagedBy,@{Expression={(Get-Group $_.Name).Notes};Label="Notes"}

Sigo obteniendo el mismo resultado sin ninguna nota...

Name        GroupType ManagedBy Notes
----        --------- --------- -----
Head-of-Ops Universal {}

Simplemente no entiendo :/

¿Alguien de ustedes ve el problema y puede indicarmelo?

Atentamente,

Kevin van Thiel

Respuesta1

Ejecuté este comando con el parámetro -verbose ahora y creo que estoy un paso más cerca de la solución. Creo que en algún momento simplemente le falta un parámetro, pero no sé cuál. Este es el Código: (He marcado información confidencial con un asterisco *)

Get-DistributionGroup Head-of-Ops@h***.com -Verbose | Select-Object Name,GroupType,ManagedBy,@{Name="Notes";Expression={(Get-Group $_.Name).Notes}} -Verbose
VERBOSE: [16:04:28.885 GMT] Get-DistributionGroup : Active Directory session settings for 'Get-DistributionGroup' are: View Entire Forest: 'False', Default Scope: 'h***.de', Configuration Domain Controller: 'H***.h***.de',
Preferred Global Catalog: '***.h***.h***.de', Preferred Domain Controllers: '{ ****.h***.h***.de, H***.h***.de }'
VERBOSE: [16:04:28.916 GMT] Get-DistributionGroup : Runspace context: Executing user: h***.de/Companies/H***/D***/User/IT Service/****, Executing user organization: , Current organization: , RBAC-enabled: Enabled.
VERBOSE: [16:04:28.916 GMT] Get-DistributionGroup : Beginning processing &
VERBOSE: [16:04:28.932 GMT] Get-DistributionGroup : Current ScopeSet is: { Recipient Read Scope: {{, }}, Recipient Write Scopes: {{, }}, Configuration Read Scope: {{, }}, Configuration Write Scope(s): {{, }, }, Exclusive Recipient
Scope(s): {}, Exclusive Configuration Scope(s): {} }
VERBOSE: [16:04:28.932 GMT] Get-DistributionGroup : Resolved current organization: .
VERBOSE: [16:04:28.932 GMT] Get-DistributionGroup : Searching objects "Head-of-Ops@h***.com" of type "ADGroup" under the root "$null".
VERBOSE: [16:04:28.932 GMT] Get-DistributionGroup : Previous operation run on domain controller 'H***.h***.de'.
VERBOSE: [16:04:28.932 GMT] Get-DistributionGroup : Previous operation run on domain controller 'H***.h***.de'.
VERBOSE: [16:04:28.932 GMT] Get-DistributionGroup : Preparing to output objects. The maximum size of the result set is "1000".

VERBOSE: [16:04:28.947 GMT] Get-DistributionGroup : Ending processing &
Name        GroupType ManagedBy Notes
----        --------- --------- -----
Head-of-Ops Universal {}

La siguiente línea es aquella en la que creo que el problema está enterrado:

VERBOSE: [16:04:28.932 GMT] Get-DistributionGroup : Searching objects "Head-of-Ops@h***.com" of type "ADGroup" under the root "$null".

¿Alguien tiene alguna idea de lo que falta y por qué?

información relacionada