differences between regular PS and Exchange PS

Hey guys.

So, I want to read all mailboxpermissions from mailboxes where the useraccount resides in a specific OU in my AD.

im using these commands:

> $Session=New-PSSession -ComputerName $DC > Import-PSSession -Session $Session -Module ActiveDirectory 
$funktionsadressen = Get-ADUser -filter * -SearchBase "<correct OU path>" $fatemp = $funktionsadressen.samaccountname foreach ($fa in $fatemp) {Get-MailboxPermission -Identity $fa -DomainController $DC} 

now, a regular powershell console will fill $fatemp with a list of all samaccountnames so i could loop those through my foreach. when i uses the exact commands in an exchange PS console $fatemp stais empty.

why is that, and what can I do?

submitted by /u/overlydelicioustea
[link] [comments]

Leave a Reply