Loop through Name list in Object

HI experts,

below is my script.

 

#=== Connect to the BizTalk Management database ===#

$Catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$Catalog.ConnectionString = "SERVER=.;DATABASE=BizTalkMgmtDb;Integrated Security=SSPI"

$Catalog.Parties| Format-List Name

when i run the above i can see the data is coming in list, now how can get the individual name in the for each loop.

because i need to get the each party name and delete?

Can any one help me to get name using foreach or whatever

August 25th, 2015 11:43am

Hi,

I don't have a BizTalk instance to test with, but here's how I'd start:

$Catalog.Parties | ForEach {

    $name = $_.Name

    Write-Host "Current name is $name" -ForegroundColor Green

}

Free Windows Admin Tool Kit Click here and download it now
August 25th, 2015 11:45am

Super and thanks a lot, i should have posted this earlier to save my time,

This is my first script to work for...thank again

August 25th, 2015 11:48am

Cheers, you're very welcome.
Free Windows Admin Tool Kit Click here and download it now
August 25th, 2015 11:49am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics