- Install PowerShell 2.0 (Can be install on Windows XP SP2 / SP3)
- Open PowerShell then type "notepad $profile" without quotes.
- Notepad will come up named with "Microsoft.PowerShell_Profile.ps1
- Copy and paste following line
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://your-cas-server.mmx.com/PowerShell/ -Authentication Kerberos
Import-PSSession $s
- Save and exit the notepad.
- Open PowerShell
- Now you're ready to use PS.
-------------------------------------------------------------------------------------
(1) New-Mailbox -UserPrincipalName robertbg@mmx.com -Alias robertbg -Database 'Development Team' -Name 'Robert Gemmell' -OrganizationalUnit Development -Password (ConvertTo-SecureString -AsPlainText Pa55w0rd -Force) -FirstName Robert -LastName Gemmell -DisplayName 'Robert Gemmell'
(2) Set-Mailbox “robertbg” -MaxSendSize 20Mb -MaxReceiveSize 20Mb
(3) Set-CASMailbox robertbg -ActiveSyncEnabled:$false -OWAEnabled:$true -PopEnabled:$false -ImapEnabled:$false -MapiEnabled:$true
(4) Get-Service -name MSExchangeSA | restart-service (Type on Mailbox Server's EMS)
OR
(4) restart-Service -InputObject (get-Service -ComputerName ygn-mb1-2k8 -Name MSExchangeSA) (from remote client's powershell)
(5) Update-FileDistributionService -Identity your-cas-server -Type OAB (Type on CAS Server's EMS or remote client's powershell)
(6) Test-Mailflow -TargetEmailAddress 'robertbg@mmx.com' <- an email will received with message "This is a test message from Test-Mailflow"
-------------------------------------------------------------------------------------
Set-Mailbox -Identity dave -UseDatabaseQuotaDefaults $false -ProhibitSendReceiveQuota 2GB -IssueWarningQuota 1gb
Disable-Mailbox -Identity dave -Confirm:$false (Disable Account and mark dbase to delete)
-------------------------------------------------------------------------------------
Mail Enable for AD Users
------------------------
Enable-Mailbox dave -Database Development Team
Get-User -RecipientTypeDetails dave | Enable-Mailbox -Database Development Team
-------------------------------------------------------------------------------------
Exchange Servers Monitoring Commands
------------------------------------
Get-ExchangeServer | Test-ServiceHealth <- Check all the Exchange Services on all the exchange servers.
Test-ServiceHealth | Select-Object -Expand ServicesNotRunning | Start-Service
get-service *exch* <- check all the exchange services on local server
Get-Service *exch* | Where-Object {$_.Status -eq 'Running'} <- only running services
Get-ExchangeServer | ForEach-Object {Get-Service *exch* -ComputerName $_.Name | Where-Object {$_.Status -eq 'Running'}} <- check all the running services on servers
Get-Service MSExchangeAB -ComputerName ygn-cas-2k8 | fl * <- look detail on MSExchangeAB Service
Test-ServiceHealth | Select-Object -ExpandProperty ServicesNotRunning | Start-Service
(Start Services if not running)
Get-EventLog -list
Get-EventLog -LogName Application -Source *exch* -EntryType Error <- Only errors
Get-WmiObject Win32_LogicalDisk -Filter "DriveType='3'" | select @{n="Drive";e={$_.DeviceId}},@{n="Size";e={[math]::Round($_.Size/1gb,2)}},@{n="FreeSpace";e={[math]::Round($_.FreeSpace/1gb,2)}} <- check disk space on local server.
Subscribe to:
Post Comments (Atom)
-
ကကုသန္ဓော ကောဏဂမနော ကဿပေါ ဂေါတမော မုနိဆယ်ထား ဆယ်တော်မူမြတ်စွာဘုရား မေတ္တယျော ပဉ္စဗုဒ္ဓေါတေ သိသေမေသန္တ သဗ္ဗဒါ ဧတေသံ အာနုဘာဝေန ရက္ခဒေဝါ မဟိဒ္ဓ...
-
Ref: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006651 Ref: http://ict-freak.nl/...
-
When running on Windows, Moshell uses a unix emulator known as Cygwin. Go directly to step 13 if you have already installed and configured c...
No comments:
Post a Comment