Kenneth Qvistgaard Dalbjerg, IT Konsulent i århus
Citrix Certified

Archive for the ‘Powershell’ Category

Powershell – Get Mailbox permission search on title = InterneServices

Thursday, January 27th, 2011 Posted in Powershell | No Comments »

$File = "C:\ita\fulldadgang-services.txt" $AllUsers = get-user -filter {Title -eq "InterneServices"} | select name $AllUsers | Foreach { echo "" echo "" echo "" echo $_.name Get-MailboxPermission -identity $_.name } | out-File $File

Powershell – Get-DistributionGroup with all email addressess

Thursday, January 27th, 2011 Posted in Powershell | No Comments »

$File = "C:\ita\groupslog.txt" Get-DistributionGroup | select name , alias ,displayname,EmailAddresses | foreach { “Name: “+$_.name “Alias: “+$_.alias “Displayname“ +$_.displayname $_.EmailAddresses | foreach { if($_.SmtpAddress){ “SmtpAddress: “+$_.SmtpAddress } } } | out-File $File