Sunday, March 29, 2015

Patching Procedure and Verification Tests-Exchange

Patching Procedure

1.   Login to the server

2.   For Windows Patching

1.   Go to start à All Programs à Windows Update



             2. Click on the blue where it says numbers of updates are available.



             3. Ensure that there is no Exchange rollup/hotfix/ServicePack, if there is a rollup checked then UNCHECK the Exchange rollup/hotfix/ServicePack

             4. Then Click ok and then click on Install Updates

             5. Once completed click finished and restart the server.
 
            6. Once restart the server again check updates, if it available new update, click Install
           
             7. Once completed click finished and restart the server.
            
              8. Verify the all services running working fine.
 
 
Verification Tests

Run the following tests on all Exchange servers

1.Get-queue | ? {$_.MessageCount –gt 5}

Queue should be less than 10 mails

2.Test-ServiceHealth

No service should show in ServiceNotRunning under any role.

        

                 3. Test-ReplactionHealth

                                         Replication should show Passed for all

                 4. Test-OutlookWebServices

                                         No Error should come except the Id 1104

                 5. Test-Mapiconnectivity

                                         This should come success

                 6. Get-mailboxdatabasecopystatus **

                                         Databases should show healthy and mounted.

                 7. Login to OWA using test account and test send and receive of the email.

Active Directory Script

The following table lists all the cmdlets that are available in this release of the Active Directory module in Windows Server 2008 R2.
PS C:\> Get-ADDomain

Retrieve properties for the Administrators group:
PS C:\> Get-ADGroup -Identity Administrators | Get-Member

Retrieve ALL properties for the Administrators group:
PS C:\> Get-ADGroup -Identity Administrators -Properties *| Get-Member

Retrieve the extended properties "Organization" and the default properties for the user: Rakeshc:
PS C:\> GetADUser -Identity rakeshc –Properties Organization

Retrieve the properties with LDAP display names of "hcluser" and "messaging", for the user: rakeshc:
PS C:\> GetADUser -Identity rakeshc -Properties hcluser, messaging |Get-Member

PS C:\> New-ADGroup -Server DC1.msexchangequery.com -Path "OU=Exchange,DC=dc" -Name AccountLeads -GroupScope DomainLocal -GroupCategory Distribution
PS C:\> New-ADGroup -Name "Lync Admins" -SamAccountName RODCAdmins -GroupCategory Security -GroupScope Global -DisplayName "Lync Administrators" -Path "CN=Exchange,DC=dc,DC=Com" -Description "Members of this group are Lync Administrators"

Remove the group that has samAccountName 'messaging':
PS C:\> remove-adgroup messaging

Get all groups whose name starts with 'messaging' and remove them:
PS C:\> get-adgroup -filter 'Name -like "messaging"' | remove-adgroup

Remove a group, the cmdlet will prompt for a name:
PS C:\> remove-adgroup

PS C:\> Get-ADGroup lyncAdmin -Properties Description

Adds the user accounts with SamAccountNames User01 and User02 to the group messaging:
PS C:\> Add-ADGroupMember messaging User1,User2

Get all the members of the administrators groups using the default behavior:
PS C:\> get-adgroupmember -Identity "messaging"

Remove the user with samAccountName 'FredB' from the group 'messaging':
PS C:\> remove-adgroupmember -Identity "messaging" -Member "rakeshc"

Remove the users with samAccountNames 'administrator' and 'rakeshc' from the group 'messaging' and don't ask to confirm:
PS C:\> remove-adgroupmember "messaging" "administrator","rakeshc" -Confirm:$false

Retrieve all the groups the administrator is a member of:
PS C:\> get-adprincipalgroupmembership -Identity Administrator

PS C:\> Get-ADUser rakeshc

PS C:\> Get-ADUser –Filter {Surname –eq “chaturvedi”}

PS C:\> Get-ADUser –Filter {GivenName –eq “Rakesh”}

PS C:\> Get-ADPrincipalGroupMembership –Identity rakeshc

PS C:\> Remove-ADGroupMember –Identity “Group Name” –Member  “rakeshc”

PS C:\> Get-ADPrincipalGroupMembership –Identity khess

PS C:\> New-ADUser –Name “Rakesh Chaturvedi” –GivenName Rakesh –Surname Chaturvedi –UserPrincipalName rakeshc@msexchangequery.com –SamAccountName rakeshc

PS C:\> Get-ADUser rakeshc

PS C:\> Add-ADGroupMember CS-Administrator rakeshc

PS C:\> New-ADUser –Name “Rakesh Chaturvedi” –GivenName Rakesh –Surname Chaturvedi –UserPrincipalName rakeshc@msexchangequery.com –SamAccountName rakeshc –Enabled 1 –AccountPassword (Read-Host –AsSecureString “Password”)

PS C:\> Search-ADAccount –AccountDisabled –UserOnly |FT Name

PS C:\> Set-ADAccountPassword –Identity rakeshc –NewPassword (Read-Host –AsSecureString “New Password”) –OldPassword (Read-Host –AsSecureString “Old Password”)

PS C:\> Enable-ADAccount –Identity rakeshc

PS C:\> Search-ADAccount –AccountDisabled –UserOnly |FT Name

PS C:\> Search-ADAccount –LockedOut –UsersOnly |FT Name

PS C:\> Unlock-ADAccount –Identity rakeshc

PS C:\> Unlock-ADAccount –Identity (Read-Host “rakeshc”)

PS C:\> Disable-ADAccount –Identity rakeshc

PS C:\> Enable-ADAccount -Identity Rakeshc

PS C:\> Remove-ADUser rakeshc

PS C:\> Remove-ADUser rakeshc

PS C:\> Set-ADAccountPassword -Identity rakeshc
PS C:\> $newPassword = (Read-Host -Prompt "Provide New Password" -AsSecureString)

PS C:\> Set-ADAccountPassword -Identity JMarbles -NewPassword $newPassword –Reset

PS C:\> Set-ADAccountPassword -Identity JMarbles -OldPassword (ConvertTo-SecureString -AsPlainText "0ldPaZZw0rd" -Force) -NewPassword (ConvertTo-SecureString -AsPlainText "p@ssw0rd2" -Force)
PS C:\> Get-ADDomain “msexchangequery.com” –Server “DC1” –Credential “msexchangequery.com\Administrator”
PS C:\> Get-ADUser rakeshc –Server “Dc1” –Credential “msexchangequery.com\Administrator”
PS C:\> Add-ADComputerServiceAccount -Computer Computer1 -serviceAccount SvcAc1
PS C:\>  Add-ADComputerServiceAccount  -Computer Computer1 -serviceAccount SvcAc1,SvcAc2