-
$MailboxSvr = Get-MailboxServer | select name foreach($svr in $mailboxsvr) { $db = Get-MailboxDatabase -Server $svr.Name foreach($database in $db) { $Server = $database.Server.Name $Db = $database.Identity $edbfilepath = $database.EdbFilePath $path = “`\`\” + $Server + “`\” + $edbfilepath.DriveName.Remove(1) + “$”+ $edbfilepath.PathName.Remove(0,2) $Dbsize = get-item $path |select-object length $K = $Server + ” ” + $Db + ” ” + $Dbsize.Length
-
$ExchServer=Get-ExchangeServer foreach ($Server in $ExchServer) { echo $Server.name (Test-ServiceHealth $Server) }
-
Exchange Hub transport Server will be automatically load balanced with in the Active Directory Site. Hub Transport Servers are load balanced in Round robin fashion with in the Site. If you want to Force Exchange Mailbox server to use specific Hub Server you need to make use of SUBMISSIONSERVEROVERRIDELIST . Set-MailboxServer -Id:MailboxServer1 -SubmissionServerOverrideList: htserver1,htserver2 Above commands will set MailboxServer to use htserver1 and htserver2 for mailsubmission. It is normally
-
Below Powershell helps to create Dynamic DL for the users in Specific DL New-DynamicDistributionGroup -Name "IN-Users" -OrganizationalUnit "OUPath" -RecipientContainer "Domain.com" -RecipientFilter {RecipientType -eq "UserMailbox" -and Country -eq "India"} Regards, Krishna http://smtpport25.wordpress.com
-
It is always remommend to care mailbox where the database is very small. Below powershell script helps to find the smallest database in the exchange orginization and create the mailbox there.. $MailboxSvr = Get-MailboxServer | select name $i = 0 foreach($svr in $mailboxsvr) { $db = Get-MailboxDatabase -Server $svr.Name foreach($database in $db) { $Server = $database.Server.Name $Db = $database.Identity $edbfilepath = $database.EdbFilePath $path = “`\`\” + $Server + “`\” +
-
Powershell to Remove secific email address from the mailboxes in the list Get-Content C:\user.txt|Get-Mailbox | foreach { for ($i=$_.EmailAddresses.Count;$i -ge 0; $i--) { $_.EmailAddresses[$i].ProxyAddressString if ($_.EmailAddresses[$i].ProxyAddressString -like "*@xyz.com" ) { $_.EmailAddresses.RemoveAt($i) } } $_|set-mailbox }
-
Hi, I dont see problem in mapping the remote network share and executing the script. I think its should work Did u try executing the same script by copying to the local computer and you get the same error ? Can you try below command and execute the script ? Set-ExecutionPolicy Unrestricted Regards, Krishna http://smtpport25.wordpress.com
-
Corrected the same, Thanks Krishna
-
Yep, Thanks..
-
Sure, let me know Regards, Krishna http://smtpport25.wordpress.com