none
Using Powershell how do you create a search content source that uses a BDC? RRS feed

  • Question

  • Using powershell how do you create a content sorce that uses a BDC?

    Documentation on Technet for New-SPEnterpriseSearchCrawlContentSource is not very clear on how to do this.

    So far this seems most reasonable to me but it doesn't work.  It creates the content source of type Business Data Connectivity but the specified BDC is not checked off.

    $searchapp = Get-SPEnterpriseSearchServiceApplication "MySearchApplication"
    New-SPEnterpriseSearchCrawlContentSource -name "My BDC Content Source" -searchapplication $searchApp -Type Business -LOBSystemSet "NameOfMyBdc"
    
    Thursday, June 2, 2011 1:18 PM

Answers

  • I found a way to do this with PowerShell

    $searchapp = Get-SPEnterpriseSearchServiceApplication "My Search Service Application Name"
    $lobSystems = @("LOBSystemName1","LOBSystemInstanceName1")
    $proxyGroup = Get-SPServiceApplicationProxyGroup -default
    New-SPEnterpriseSearchCrawlContentSource -name "My Content Source Name" -searchapplication $searchApp -Type Business -LOBSystemSet $lobSystems -BDCApplicationProxyGroup $proxyGroup
    
    

    Wednesday, August 3, 2011 3:18 PM

All replies

  • Hello,

    I created a BDC Content Source using UI and another using PS. The PS one seems to have missing "StartAddresses" property which can be checked in UI. Now this "StartAddresses" property is read-only so I am not sure if there is another way to populate this property and hence "have the BDC checked off". I will reply to this post if I come across a way to do this.

    For your refernece:

    When Content Source is created using PS
    ------------------------------------------------------

    Type      : Business
    DeleteCount    : 0
    ErrorCount    : 0
    LevelHighErrorCount  : 0
    SuccessCount    : 0
    WarningCount    : 0
    Parent     : {Local SharePoint sites, My BDC Content Source, WorkingBDC}
    StartAddresses   : {}
    Id      : 3
    Tag      : 
    Name      : My BDC Content Source
    FullCrawlSchedule  : 
    IncrementalCrawlSchedule : 
    CrawlStatus    : Idle
    CrawlStarted    : 
    CrawlCompleted   : 
    CrawlPriority   : Normal
    CrawlState    : Idle
    

    When Content Source is created using UI
    ------------------------------------------------------
    Type      : Business
    DeleteCount    : 0
    ErrorCount    : 0
    LevelHighErrorCount  : 0
    SuccessCount    : 0
    WarningCount    : 0
    Parent     : {Local SharePoint sites, My BDC Content Source, WorkingBDC}
    StartAddresses   : {bdc3://adventureworks2008_adventureworks2008/Default/00000000%252D0000%252D0000%252D0000%252D000000000000/A
           dventureWorks2008/AdventureWorks2008&s_ce=0408080g0g000g102040080g0g100}
    Id      : 4
    Tag      : 
    Name      : WorkingBDC
    FullCrawlSchedule  : 
    IncrementalCrawlSchedule : 
    CrawlStatus    : Idle
    CrawlStarted    : 
    CrawlCompleted   : 
    CrawlPriority   : Normal
    CrawlState    : Idle
    

     


    Please remember to click 'Mark as Answer' on the post that helps you or click 'Unmark as Answer' if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Nishant Shah
    Microsoft Online Community Support
    Friday, June 17, 2011 2:38 PM
    Moderator
  • I found a way to do this with PowerShell

    $searchapp = Get-SPEnterpriseSearchServiceApplication "My Search Service Application Name"
    $lobSystems = @("LOBSystemName1","LOBSystemInstanceName1")
    $proxyGroup = Get-SPServiceApplicationProxyGroup -default
    New-SPEnterpriseSearchCrawlContentSource -name "My Content Source Name" -searchapplication $searchApp -Type Business -LOBSystemSet $lobSystems -BDCApplicationProxyGroup $proxyGroup
    
    

    Wednesday, August 3, 2011 3:18 PM
  • Thank you so much.... it works as expected on first attempt itself... you made my day....
    Monday, September 11, 2017 9:51 AM