Pages

how to Enable & Disable Active Sync For all user Exchange 2007 and 2010

Tuesday, September 30, 2014

Enable & Disable Active Sync For all user Exchange 2007 and 2010

To see ActiveSync Enabled users run fallowing PS (  Get is harmless, as the PS does not make any changes, you need to watch out for set function (-: )

Get-CASMailbox -resultSize unlimited -filter {activeSyncEnabled -eq $true}

image
Disable Active Sync for All Users
get-Mailbox | set-CASMailbox -ActiveSyncEnabled:$False

image
Enable ActiveSync for All Users
get-Mailbox | set-CASMailbox -ActiveSyncEnabled:$True

Now we will disable it for Everyone but for some selected users with fallowing Script

Get-Mailbox | set-CASMailbox -ActiveSyncEnabled:$True | Get-content C:\ActiveSyncEnabledUsers.txt

image

you may get warning like this 


if you have more than 1000 mailbox use the following 

get-mailbox -ResultSize Unlimited | set-CASMailbox -ActiveSyncEnabled:$True | Get-content C:\ActiveSyncEnabledUsers.txt

On the C drive of my server I have created simple TXT file for the output
clip_image001
image
 last one
Get-Mailbox | ForEach {Get-ActiveSyncDeviceStatistics -Mailbox:$_.Identity} | ft DeviceFriendlyName, Devicetype, DeviceUserAgent

enjoy 


how to force windows 2003 -xp to get update from WSUS


how to force windows 2003 -xp to get update from WSUS
or force Force a Wsus client to check update



open run and run command

wuauclt.exe /detectnow



you may need to Waite for minutes  


enjoy



Roaya Team











exchange 2010 How to change preferred domain controller or specific domain controller in exchange 2010

Sunday, September 28, 2014

First take a look at the current session settings. In this example Roaya-dc01.roayastore.com has been automatically selected.

[PS] C:\>Get-ADServerSettings | fl
RunspaceId                                 : 15e4d968-032b-4cd8-bc66-bf0b665c4161
DefaultGlobalCatalog                       : Roaya-dc01.roayastore.com
PreferredDomainControllerForDomain         : {}
DefaultConfigurationDomainController       : Roaya-dc01.roayastore.com
DefaultPreferredDomainControllers          : {Roaya-dc01.roayastore.com}
UserPreferredGlobalCatalog                 :
UserPreferredConfigurationDomainController :
UserPreferredDomainControllers             : {}
RecipientViewRoot                          : roayastore.com
ViewEntireForest                           : False
Identity                                   :
IsValid                                    : True

Using Set-ADServerSettings we can specify the preferred server for the current session with the -PreferredServer switch.
[PS] C:\>Set-ADServerSettings -PreferredServer Roaya-dc02.roayastore.com
Now Get-ADServerSettings shows this change has occurred.
[PS] C:\>Get-ADServerSettings | fl
RunspaceId                                 : b15cbfd9-5144-442e-bc74-c00a3216b864
DefaultGlobalCatalog                       : dc2.exchangeserverpro.local
PreferredDomainControllerForDomain         : {}
DefaultConfigurationDomainController       : Roaya-dc02.roayastore.com
DefaultPreferredDomainControllers          : {DC1.exchangeserverpro.local}
UserPreferredGlobalCatalog                 : Roaya-dc02.roayastore.com
UserPreferredConfigurationDomainController : Roaya-dc02.roayastore.com
UserPreferredDomainControllers             : {Roaya-dc02.roayastore.com}
RecipientViewRoot                          : roayastore.com
ViewEntireForest                           : False
Identity                                   :
IsValid                                    : True


IF is not working

 my be domain controller not Global catalog or doesn't have the correct permissions so make sure the the new DC is global catalog if not working

Insert exchange 2010 media   preferred domain controller and run CMD with administration permission

Run

 setup /PrepareDomain

enjoy


 Diyaa Oda


 

Search This Blog

Most Reading

Facebook Fans

About Roaya Electronic

click on vizvon the biggest online shopping in Egypt cheapest online shopping in Egypt ever all product guaranteed free return for 30 days all product guaranteed by original manufacturer first website in Egypt accept Paypal all our woman corner product are exported vizvon have special department for it needs ex " server - firewall - laptop - switches - UPS " and more Welcome to vizvon.com