locked
Updating address in a Receive location using Powershell factory provider for BizTalk RRS feed

  • Question

  • Hi,

    I am trying to update the address property to a new value using a PowerShell script that uses Powershell factory provider for BizTalk.

    So, it looks like below:

    $ReceiveLocation=Get-ChildItem'Biztalk:\All Artifacts\Receive Locations'|Where-Object{$_.name -eq'ReceiveLocation1'}

    $ReceiveLocation.Address = mssql://Servername1/Instance1/TestDB?

    I am assigning the correct new address as per the Adapter used. When I run the above command, it doesn't throw any error but it doesn't change the value in receive location.

    Has anyone faced this issue or do you have any suggestions?

    Regards

    Biranchi

    Monday, April 8, 2019 9:33 AM

All replies

  • Hi, I made same test with same result  - RL address is changed only in PowerShell window but no change in BizTalk admin console and as root cause is probably that changes like this is not supported by BizTalk PowerShell Provider.

    See list of available commands  - Get-Command | where { $_.ModuleName -like "BizTalk*" }


    Tuesday, April 9, 2019 9:28 AM
  • It's been a long time since I've used the PS Provider...is there a Save method on the ReceiveLocation object?

    When using WMI or ExplorerOM, there are a number of places where you have to explicitly Save.

    The PS Provider just wraps a lot of these so saving may also be required there.

    Tuesday, April 9, 2019 5:16 PM
    Moderator
  • Hi,

    Interestingly I could update a Send Port with new URI and also update UPN values. But it doesn't work with a receive location.

    May be  BizTalk PowerShell Provider doesn't support it for updating receive locations.

    Regards

    Biranchi

    Wednesday, April 10, 2019 6:55 AM
  • Hi,

    No, I don't see a Save method on Receive location object.

    Regards

    Biranchi

    Wednesday, April 10, 2019 6:56 AM
  • One more wrinkle.  In some cases, the URI is composed internally from other properties.  Maybe you need to update those to have the change reflected in the URI.
    Wednesday, April 10, 2019 12:54 PM
    Moderator