Category: Powershell

0

Remove-RoutingGroupConnector – The operation couldn’t be performed because ‘rg-exchange’ matches multiple entries.

I have this problems that i could delete a routinggroup between an old Exchange 2003 and a new Exchange 2010. When i type Get-RoutingGroupConnector Name SourceRoutingGroup TargetRoutingGroup —- —————— —————— RG-Exchange Exchange Routing Group...

0

Powershell – Get all Security Groups from AD

First install http://www.quest.com/powershell/activeroles-server.aspx Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue $File = “C:\ita\securitygroups.txt” $AllGroups = get-qadgroup -grouptype “Security” | select name, Description $AllGroups | Foreach { echo “” echo “” echo $_.name echo $_.description } | out-File...

0

Powershell – Import users from CSV file

import-csv user.csv | foreach-object { echo $_.Displayname New-Mailbox -name ( $_.Name) -Alias $_.Alias -SamAccountName $_.SamAccountName -RecipientType $_.RecipientType -RecipientTypeDetails $_.RecipientTypeDetails -Displayname $_.Displayname } Share this:

0

Powershell – Show all users in DistributionGroup

$File = “C:\ita\groupslog.txt” $Mailboxes = Get-DistributionGroup | select name , alias ,displayname,EmailAddresses $Mailboxes | ForEach { echo “” echo “” echo $_.name Get-DistributionGroupMember -id $_.alias } | out-File $File Share this:

0

Powershell – Show witch users have access to mailboxes

$file =  “C:\ita\fulladgang.txt” $AllUsers = get-mailbox  | select SamAccountName, name, alias $AllUsers | Foreach { echo “” echo “” echo “” echo $_.name get-mailboxfolderpermission -identity $Mailbox } | out-File $File Share this:

0

Powershell – Get-DistributionGroup with all email addressess

$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 Share this: