PowerShell Scripting Question Exchange Address Lists -eq

I am trying to set a Global Address List using Powershell. When it executes, the output does not change $custom to the actual value. It keeps '$custom'. What am I doing wrong? 
This is my code: 
$company = "test"
$custom = read-host "Enter custom attribute"
New-GlobalAddressList -Name "$company GAL" -RecipientFilter {(CustomAttribute15 -eq "$custom")} 
I also tried:
New-GlobalAddressList -Name "$company GAL" -RecipientFilter {(CustomAttribute15 -eq $($custom))} 

Hi Mike,
Try to modify the custom attribute using adsiedit 
Start ADSI Edit.
In the All Global Address Lists container, locate the newly created Address List.
Open the properties of the Address List object.
In the select a property to view list, click purportedsearch .
Enter the LDAP query that you want to process, and then set that value.
Click OK , and then force replication and see.
Try to set this custom attribute for single user and check if it works for single user 
Get-mailbox -Organizationalunit "users OU" | set-mailbox customattribute1 "$company GAL"
Bounce the Microsoft File Distribution service and see if it does not reflect.
Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. 
That will encourage me - and others - to take time out to help you. 
Regards, 
Sathish

Similar Messages

  • Hide from Exchange Address list works in EMC but not from ADUC

    We are using Exchange 2010 Version 14.3 (Build 123.4) in a 2008 AD environment. When hiding users from the GAL we found when performing this task from AD Users and Computers the box is check and we verify that it is checked in EMC but the user remains
    visible. This can be an active user or a disabled user. The results are the same. But when checking the box "Hide from Exchange address list" in the EMC the change is visible instantly. We can verify that both in the GAL and from OWA. It had worked
    prior but now is no longer effective from ADUC even though the box is checked in the EMC. I can check the box in ADUC and verify in Power shell HiddenFromAddressListsEnabled : True yet the user is not hidden. I assume that ADUC is fully integrated with Exchange
    but the changes are only effective from Exchange

    There are 3 2008 DC. I can see the change instantly on the EMC and in Power Shell. When the changes are made via the EMC the changes are instant. When made from ADUC they never update. I think you hit the nail on the head with the versions. I have only been
    here about 10 months and recently (2 months ago) fully decommission our 2003 Exchange which was hanging around for some time. Since I had experience I followed procedure and decommissioned the 2003 environment. Now as far ADUC my copy is Active Directory Users
    and Computers Version: 6.1.7601.17514
    I can assume from what I am reading that even though the check box and tabs for Exchange can be added, they do not function completely from ADUC? I just need to provide our Help Desk with a "best practices" They have been disabling and hiding users
    via ADUC for years and claim it just stopped working.
    So is it a correct statement that Exchange 2010 and above attributes can no longer be changed via ADUC?
    ~Steve

  • Run powershell script against exchange using task schedule

    I want to run this using task scheduler
    Get-MailboxStatistics -Server mailserver  | Select DisplayName, ItemCount, TotalItemSize | Sort-Object TotalItemSize -Descending | Export-CSV "\\pacetoputreport\report_$((Get-Date).ToString('MM-dd-yyyy')).csv"
    I know I have to run some variation of this to launch the exchange module
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto"
    How can I do this in Task Scheduler? I have tried numerous times using various combinations, but nothing seems to work.
    Thank you

    You need to put the first part where you call powershell.exe in the Program/script part of the task, but the rest of it is put into the arguments section. As explained here
    http://www.msexchange.org/kbase/ExchangeServerTips/ExchangeServer2013/Powershell/scheduling-exchange-powershell-task.html (which has versions for both 2010 and 2013, but since you list V14 in your filepath I assume you're using 2010) you'd need to
    set the arguments to :
    -version 2.0 -NonInteractive -WindowStyle Hidden -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; <Your Command>"

  • Powershell Script for Exchange- Storagelimitstatus wont return any data.

    I am trying to run the following script using PowerGUI and its working but one piece. The storagelimitstatus isn't returning any data. Any impute would great.
    Here is what I wrote. 
    If (-not (Get-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction SilentlyContinue))
    {   Try { Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction Stop }
        Catch { Write-Host "Unable to load Exchange tools because ""$($Error[0])""" -ForegroundColor Red ; Exit }
    Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName,IssueWarningQuota, storagelimitstatus,ProhibitSendQuota,ProhibitSendReceiveQuota,@{label="TotalItemSize(MB)";expression={(Get-MailboxStatistics $_).TotalItemSize.Value.ToMB()}}, @{label="ItemCount";expression={(Get-MailboxStatistics
    $_).ItemCount}}, Database| Export-Csv "\\pc1417\c$\Scripts\UserMailboxSizes.csv" -NoTypeInformatio

    StorageLimitStatus is a property extracted by Get-MailboxStatistics and not Get-Mailbox.Try below and check if that works!
    Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName,IssueWarningQuota,@{label="StorageLimitStatus";expression={(Get-MailboxStatistics $_).StorageLimitStatus}},ProhibitSendQuota,ProhibitSendReceiveQuota,@{label="TotalItemSize(MB)";expression={(Get-MailboxStatistics $_).TotalItemSize.Value.ToMB()}}, @{label="ItemCount";expression={(Get-MailboxStatistics $_).ItemCount}}, Database| Export-Csv "\\pc1417\c$\Scripts\UserMailboxSizes.csv" -NoTypeInformation
    Pavan Maganti ~ ( Exchange | 2003/2007/2010/E15(2013)) ~~ Please remember to click “Vote As Helpful&quot; if it really helps and &quot;Mark as Answer” if it answers your question, “Unmark as Answer” if a marked post does not actually answer your
    question. ~~ This Information is provided is &quot;AS IS&quot; and confers NO Rights!!

  • Powershell script to get the list of pages using a particular webpart in SharePoint 2013

    I want to find all the pages withing a web application  or site collection on which particular webpart is enabled. I have seen the link
    http://www.glynblogs.com/2011/07/listing-all-web-parts-in-a-site-collection-with-powershell.html but it doesnt work for default.aspx.please suggest

    found a script at
    https://gallery.technet.microsoft.com/List-all-web-parts-in-page-afc7840f
    Please Mark it as answer if this reply helps you in resolving the issue,It will help other users facing similar problem

  • Powershell script to get a LIST OF ALL SITES ALONG WITH URL from a web application where we gave access to EVERYONE AD GROUP

    Hi,
    Any help on this?
    Thanks
    srabon

    i found one on the Codeplex, this will check Nt auth group, you have to modify accordingly your need and test it in your test farm.script is for 2010 but i am positive it will work for 2013 as well.
    The Sixth script lists
    all the site collections which have "NT AUTHORITY\authenticated users" in
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Powershell script for Exchange Server 2010 health check

    People,
    Can anyone here please share the Powershell to check the Exchange Server health and functionality after patching and Service Pack update?
    I need to test multiple servers in my AD environment.
    Thanks
    /* Server Support Specialist */

    Hi,
    In Exchange 2010, you can use the Test-ServiceHealth cmdlet to test whether all the Microsoft Windows services that Exchange requires on a server have started.
    A related article about this command.
    https://technet.microsoft.com/en-us/library/aa998852(v=exchg.150).aspx
    You can also use the EXBPA tool to do Exchange server health check. You can look at the blog below.
    http://blogs.msdn.com/b/douggowans/archive/2007/06/06/run-your-own-exchange-server-health-check-the-tools.aspx
    Hope this is helpful to you.
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Belinda Ma
    TechNet Community Support

  • Send PowerShell Script to Exchange 2013

    Hello everyone,
    can I send a shell command to the Exchange Server, if I catch the Outlook Session via VB/C#?
    Best regards
    Vi

    You'll have to be much more specific about where exactly you get stuck and what you are trying to achieve.
    Also, you might be better off posting this in the developer forum down the hall instead:
    http://social.msdn.microsoft.com/Forums/en-US/outlookdev/threads
    Robert Sparnaaij
    [MVP-Outlook]
    Outlook guides and more: HowTo-Outlook.com
    Outlook Quick Tips: MSOutlook.info

  • Hiding users from Global Address List in Exchange 2010

    I am attempting to hide users no longer in our company from our GAL.  I have been trying to do this through Active Directory.  I verified the 'hide from Exchange address list' in AD is checked for these users, but they still shows up.  On
    my own PC I deleted the *.oab files and downloaded the offline address book again, but it still shows.  I also checked OWA and they show in there as well.
    Is there anywhere else that would hold these?  I have searched but could not find much related to this.  We are running Exchange 2010 SP1.
    Any help would be appreciated.

    How to Hide Users From GAL
    http://pdtechguru.wordpress.com/2012/10/26/how-to-hide-users-from-gal/

  • How to export Powershell script information to Sharepoint?

    I'm trying to export information gather from a Powershell script to a Sharepoint list. I've got a couple of powershell scripts that gather general server information from a server ex: server uptime, disk space, service tag, etc. and it will export the information
    to a csv file. What I would like to do is out-put the same information gathered by the powershell scripts to a Sharepoint list directly if at all possible.
    Ex:
    # all this does is reads from a list and runs a script call "boottime.ps1"
    get-content "\\%Data-Path-Of-List%\computers.txt" | %Data-Path-Of-Script%\boottime.ps1 |  Export-csv %Data-Path-For-CSV\Computers.csv
    # then just exports the information from the boottime.ps1 script to a csv file
    #I also have a script that will upload the information to a sharepoint list.
    # I found that I have to run this in version 2 of powershell, so I just open a DOS prompt in Admin Priv's and type the following
    powershell.exe -version 2.0
    # Next I make sure the Sharepoint snap-in is loaded
    if ( (Get-PSSnapin -Name Microsoft.sharepoint.powershell - erroraction silentlycontinue) -eq $null)
    Add-PsSnapin Microsoft.Sharepoint.Powershell
    $spweb = get-SPweb $spserver
    $spdata =$spweb.getlist("%URL_Of_My_List%")
    # this is the same location from the orginal Powershell script previously stated.
    $ComputerInfoFile = "%Data-Path-For-CSV%\Computers.csv"
    foreach ($rows in $tblData) {
    # here is where I add the information from my csv file
    # 2 things needs to be present
    # 1st the colums have to be present in the sharepoint site before I can upload the information
    # 2nd the columns have to the headers in my csv file
    $spItem = $spData.AddItem()
    $SpItem["ServerName"] = $row."ServerName".toString()
    $SpItem["Uptime"] = $row."Uptime".toString()
    $SpItem.Update()
    # this just disconnects from Sharepoint
    $spWeb.Dispose()
    Please dismiss all the comments it just helps me understand what the code is doing, also if this is not the correct place to post this question I appologize in adavance and ask that if this is the incorrect place to post this question please provide me a
    link to a where I can post such questions.

    Sorry for the delay in posting this, but I ended up getting working. I'll post it in the hopes that my head scratching will save someone else some head scratching:
    I ended up writting 3 PS scripts and one batch job.
    1st Batch file
    powershell.exe -version 2.0 -command
    \\%Script-Location\Get-Server-Infor-4-SP.ps1
    powershell.exe -version 2.0 -command \\%Script-Location\Delete-list-Items.ps1"
    powershell -veriosn 2.0 -command
    \\%Script-Location\Populate-SP.ps1
    1st PS script that gets the info:
    get-content
    \\%Location-Of-My-File-With-List-Of-Servers%\%name-of-file%.txt |
    \\%Location-Of-My-Script-To-get-the-Information-I-want | Export-csv
    \\%location-of-my-output\%filename%.csv
    Ex: get-content C:\scripts\computers.txt | C:\scripts\boottime.ps1 | export-csv C:\scripts\computer.csv
    2nd PS script Delete-List-Items.ps1
    # http:
    #Script 1 Boottime.ps1:
    # This script permits to get UpTime from localHost or a set of remote Computer
    # usage
    # localHost
    # .\BootTime.ps1
    # set of remote computers
    # get-content .\MyserverList.txt | .\boottime.ps1
    # Optionally pipe output to Export-Csv, ConverTo-Html
    Process {
    $ServerName = $_
    if ($serverName -eq $Null) {
    $serverName= $env:COMPUTERNAME
    $timeVal = (Get-WmiObject -ComputerName $ServerName -Query "SELECT LastBootUpTime FROM Win32_OperatingSystem").LastBootUpTime
    #$timeVal
    $DbPoint = [char]58
    $Years = $timeVal.substring(0,4)
    $Months = $timeVal.substring(4,2)
    $Days = $timeVal.substring(6,2)
    $Hours = $timeVal.substring(8,2)
    $Mins = $timeVal.substring(10,2)
    $Secondes = $timeVal.substring(12,2)
    $dayDiff = New-TimeSpan $(Get-Date –month $Months -day $Days -year $Years -hour $Hours -minute $Mins -Second $Secondes) $(Get-Date)
    $Info = "" | select ServerName, Uptime
    $Info.servername = $servername
    $d =$dayDiff.days
    $h =$dayDiff.hours
    $m =$dayDiff.Minutes
    $s = $daydiff.Seconds
    $info.Uptime = "$d Days $h Hours $m Min $s Sec"
    $Info
    #Script 2: Delete-List-Items.ps1
    # http://markimarta.com/sharepoint/delete-all-items-in-sharepoint-list-using-powershell/
    # there seems to be a problem with running this script in version 3 or later, the workaround is to run it in version 2
    # below is the cmd for doing so, just open up a DOS prompt with Admin Privileges Start-->Run-->cmd
    # type then copy and paste the following line the DOS window then you can run this script
    #powershell.exe -version 2.0
    # make sure that the Microsoft.SharePoint.PowerShell Snap-in is installed as well
    if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
    Add-PsSnapin Microsoft.SharePoint.PowerShell
    # "Enter the site URL instead http://serverurl"
    $SITEURL = "%http://serverurl%"
    $site = new-object Microsoft.SharePoint.SPSite ( $SITEURL )
    $web = $site.OpenWeb()
    "Web is : " + $web.Title
    # Enter name of the List below in the [“%List-Name%”]
    $oList = $web.Lists["%List-Name%"];
    # This echo out the name of the list its going to be deleting the records from
    "List is :" + $oList.Title + " with item count " + $oList.ItemCount
    # It’s just counting the rows/records
    $collListItems = $oList.Items;
    $count = $collListItems.Count - 1
    # Here is where it is actually deleting the records and then out put the number or the record it deleted
    for($intIndex = $count; $intIndex -gt -1; $intIndex--)
    "Deleting record: " + $intIndex
    $collListItems.Delete($intIndex);
    #Script 3: Populate-SP_Test.ps1
    # http://blogs.technet.com/b/stuffstevesays/archive/2013/07/10/3577320.aspx
    # there seems to be a problem with running this script in version 3 or later, the workaround is to run it in veriosn 2
    # below is the cmd for doing so, just open up a DOS prompt with Admin Privileges Start-->Run-->cmd
    # type then copy and paste the following line the the DOS window then you can run this script
    #powershell.exe -version 2.0
    # make sure that the Microsoft.SharePoint.PowerShell Snap-in is installed
    if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null )
    Add-PsSnapin Microsoft.SharePoint.PowerShell
    # Here are some more varables that can be added I was not able to get this to work
    #$SPComputerInfo="/Lists/PowershellTest/"
    # Here is where we connect and Open SharePoint List via Powershell
    $SPServer= "%http://serverurl%
    $spWeb = Get-SPWeb $SPServer
    $spData = $spWeb.GetList("%List-Name%")
    # This is the variable for the path that has the file I want to input to SharePoint List
    $InvFile="\\%location-ofList%\computers.csv"
    # This is just some error checking to make sure the file exist
    $FileExists = (Test-Path $InvFile -PathType Leaf)
    if ($FileExists) {
    "Loading $InvFile for processing..."
    $tblData = import-csv $InvFile
    } else {
    "$InvFile not found - stopping import!"
    exit
    # Loop through Applications add each one to SharePoint
    "Uploading data to SharePoint...."
    foreach ($row in $tblData) {
    #Here is where I add the information from my CSV file
    #2 things have to be present
    # 1. the columns have to be in the sharepoint site before I can import the information
    # 2. columns have to the headers in my csv file
    #"Adding entry for "+$row."Computer Information".ToString()
    $spItem = $spData.AddItem()
    $spItem["ServerName"] = $row."ServerName".ToString()
    $spItem["Uptime"] = $row."Uptime".ToString()
    #$spItem["DNSHostName"] = $row."DNSHostName".ToString()
    #$spItem["DistinguishedName"] = $row."DistinguishedName".ToString()
    $spItem.Update()
    # This is just disconnecting from SharePoint
    $spWeb.Dispose()
    Enjoy, and if anyone has a better way of doing this I'm interested in knowing, thanks again
    Thanks in Adavance

  • Excluding disabled and expired users from Global Address List

    There showed a request in my company to remove expired user accounts from the GAL. Is there any way to do it in the filter rules of the GAL? I would practicaly like to exclude them from GAL when they are expired, and include them in the GAL when enabling
    them again, but in an automatic way. Is there any method existing to do that? We are using Exchange Server 2003.
    Thanx,
    Kristian

    Hi,
    To hide from the address list, you can follow the steps below to get this.
    1. Open ESM, expand Recipients.
    2. Click on All Global Address Lists, in the right hand pane right click
    Default Global Address List and go to Properties.
    3. In the Default Global Address List Properties, click preview.
    4. Scroll through a list of users to choose the user you want to hide, right click and go to Properties.
    5. Under the Exchange Advanced tab, check "hide from Exchange address lists"
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Creating a new address list for Exchange Online (Office 365) by two parameters

    Good day!
    I need to create two new address list in Exchange Online 2013 (Office 365) that users will choose the two parameters.
    Address sheet1: No staff
    Address Sheet2: Staff
    Parameters address sheet not staff:
    Parameter 1: Company
    It must match the value - MyCompany
    Parameter 2: job title
    it must be different from the value - Staff
    Parameters address sheet Staff:
    Parameter 1: Company
    It must match the value - MyCompany
    Parameter 2: job title
    It must match the value - Staff
    Problems:
    1) Is it possible to filter user mailboxes on the parameter of discrepancy?
    2) Can not find the parameter values ​​for the script field job title
    https://technet.microsoft.com/ru-ru/library/aa996912%28v=exchg.150%29.aspx
    https://technet.microsoft.com/en-us/library/bb738157%28v=exchg.150%29.aspx
    While on the side of 365 in the user properties such parameter is:
    http://joxi.ru/MAj0Jj7hGyDbme
    Company option too.

    I got to build a team that I need (describes the necessary conditions)
    and successfully held in PS 4.0 after connecting to the office 365:
    1) Set-ExecutionPolicy unrestricted
    2) $ UserCredential = Get-Credential
    (Data Entry Administrator 365)
    3) $ Session = New-PSSession -ConfigurationName
    Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $ UserCredential -Authentication Basic -AllowRedirection
    Import-PSSession $ Session
    4)
    PS C:\Windows\system32> New-AddressList -Name 'TEST1234' -RecipientFilter {((RecipientType -eq 'UserMailbox') -and ((Com
    pany -eq 'Company1') -and (Title -ne 'Student')))}
    Name                      DisplayName               RecipientFilter
    TEST1234                  TEST1234                  ((RecipientType -eq 'UserMailbox')
    -and (((Company -eq 'Company1...
    As a result, the new address list TEST1234 immediately appears. (When creating a new letter in the menu "To"), but on the inside
    it is empty (although there is 1 user which is fully consistent with those described in the filter conditions.).
    = (
    Tried a simple version:
    Office365
    не отображается в адресном списке.">The same thing - the only user with such parameters in AD -> Office365 is not displayed in the address list.
    (After running for a list TEST123 more than two days)
    Tell me what could be the problem?

  • Is there a way to remove Exchange global address list from phone/Mail app?

    I have an iPhone 5 running iOS 7.0.3. Wondering if there is a way I can prevent an Exchange global address list from loading when I compose a message. I am only syncing Mail - not contacts or calendars. Also tried dropping and re-adding account to see if that did anything. This is a personal phone connected to company's Exchange account (legitimately) - I would like to reduce the chance that I incorrectly email a company employee from my personal account when composing a message.

    That is what I expected Chris, but to answer your question - yes. I have two accounts setup with the Mail app - Gmail and Exchange. Gmail is the default even. When I am in the Gmail account, compose a new message, just typing "john" for example, brings up most recently used john's first, then all the Johns in my company. I really would prefer not to even have those names populate. Not sure if that can be prevented without dropping the Exchange mail account altogether. That is my question - and thank you for your reply.

  • Exchange 2013: Problem with Default Global Address List after migration

    I just completed a migration from Exchange 2007 to Exchange 2013.  The 2007 box has been decommissioned just last week.  I have been seeing weird issues with our offline addressbook and global address list, since the migration, but always thought
    it was related to Ex2007.  Well the issues still exist and here's what i've found so far:
    1.  If any user goes to Schedule Appointment in Outlook, and they click the Rooms button (on the Scheduling Assistant page), we get a LONG wait (about 5 mins or more) and then an error that says:  "The operation could not be completed because
    an offline address book is not available.  Download a copy of the offline address book."  When i click OK, the address book is up, with the "All Rooms" list showing blank (we have 3 rooms in Exchange currently).
    2.  Now if I go to the Address Book in Outlook it opens to the GAL and it's up to date...  I can also force an update to the offline address book after adding a new group or entry, so i know offline address books are being updated properly and
    working.  HOWEVER, if i go to any of the other address lists (besides Contacts and GAL) under All Address Lists (All Contacts, All Groups, All Rooms, All Users and Public Folders) I get the same error given above:  "The operation could not be
    completed because an offline address book is not available.  Download a copy of the offline address book." 
    3.  I went to the Exchange 2013 EAC and went to Organization -> Address Lists.  Everything under here said 'NO' under the Up-to-Date column.  When i looked at the properties on each list, and clicked save, I had to update to the new version.
     After doing this, the Up-to-Date column said 'YES'.  I could do all lists EXCEPT for the GAL.  It still says 'NO'
    4.  The last thing i did was set my Outlook to NOT be in cached mode.  This should give me a direct connection to the GAL and all lists, if I'm not mistaken...  So when i do this, I cannot even open see the GAL.  The ONLY option in the
    Address Book that comes up is Contacts (which are my personal ones).
    5.  I just now ran Get-GlobalAddressList | fl  in powershell on the Ex2013 server.  I see some things that make me wonder...   First; nothing in the RecipientFilter field, however, there is something in the LdapRecipientFilter field.
     Second; the RecipientFilterType field says "Legacy".  and Third; the RecipientFilterApplied field says "False".
    Didn't know what these should all be, but it appears maybe this is the cause of all my issues??  Can someone help me out here.. even if i have to recreate a new GAL, i'm fine with that, I just don't know all the steps to do so.  I just need it
    to work!
    Thanks
    Jeff
    -Jeff

    Hi,
    In my opinion, it is better to confirm whether the GAL is good, first.
    How about the GAL working in OWA?
    If GAL working well in OWA, it seems the issue on the Outlook Client or Connectivity side.
    Please trying to run Outlook on the safe mode to avoid some AVs, add-ins and firewall for testing.
    Please follow the steps as below to narrow down the OAB issue.
    Following are the locations that .lzx files in CAS server and BMX server:
    CAS:
    C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\OAB
    MBX:
    C:\Program Files\Micorosft\Exchange Server\V15\ExchangeOAB
    Please verify whether the .lzx files update to the latest.
    1. If the .lzx files in MBX server not update to the latest.
    It should be an issue on the OAB generation side.
    2. If the .lzx files in MBX server is latest, but CAS server not.
    It should be a distribution issue.
     1) Please run Get-OabVirtualDirectory command in EMS to verify whether at least one OAB VD exist in the org. If not, please create a new one.
     2) Please make sure whether any setup for Web Distribution. Selecting the “Enabling an Offline Address Book for Web Distribution” checkbox.
     3) Please force restart File Distribution services to distribute OAB files manually.
    3. If the .lzx files in MBX server and CAS server are all update to the latest.
    It should be the connectivity between CAS server and Client issue.
     1)Please verify the network.
     2)Please check DNS, MX, etc. configuration.
     3)Please run “Test E-mail AutoConfiguration” to check the AutoDiscover details.
       Please make sure the OAB URLs are correct.
       If the OAB URLs are incorrect, please using following command to re-set them:
       Set-OABVirtualDirectory -Identity "ServerFQDN\OAB (Default Web Site)" -ExternalUrl
    https://www.contoso.com/OAB -InternalUrl
    https://mail.contoso.com/OAB
     4)Please checking the App log and finding solutions from Microsoft Technet articles or KB, according to the Event ID.
     5)If it still not working after performing the methods above unfortunately, please trying to re-build OAB Virtual Directory.
       Article for reference:
       Remove, Re-Create, and Reconnect an Offline Address Book Virtual Directory
    http://technet.microsoft.com/en-us/library/bb123595(v=exchg.141).aspx 
    Hope it is helpful
    Thanks
    Mavis
    Mavis Huang
    TechNet Community Support

  • Powershell script to get all user profiles with specific email address

    Hello,
    Please help me. I need a powershell script which can do the following things.
    List of all sharepoint user profiles with email address
    [email protected]
    List of all FBA user profiles with email address  [email protected]
         List of all Pending Access Requests
    Any help is much appreciated. Thanks.
    chirag

    The script is not working for me. I changed the url according to my site. See the below error
    New-Object : Exception calling ".ctor" with "1" argument(s):
    "UserProfileApplicationNotAvailableException_Logging ::
    UserProfileApplicationProxy.ApplicationProperties ProfilePropertyCache does
    not have 3f3a5705-0691-4fe8-8643-cccd65363dc9"
    At C:\Scripts\userprofileemails.ps1:11 char:19
    + $profileManager = New-Object
    Microsoft.Office.Server.UserProfiles.UserProfileMan ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
        + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvoca
       tionException
        + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.Power
       Shell.Commands.NewObjectCommand
    You cannot call a method on a null-valued expression.
    At C:\Scripts\userprofileemails.ps1:12 char:1
    + $profiles = $profileManager.GetEnumerator()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull
    Please guide me what to do on this.
    Thanks
    chirag

Maybe you are looking for