Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Host Instance / WMI.. can’t get it working
- This topic has 4 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
October 30, 2006 at 6:19 AM #16249
Hi.
I'm trying to write some VBS/WMI scripts that (among other thing) is supposed to
1- Enabled an instance that is disabled
2- Start it up.While i can start an instance, I'm not able to Enable it.
Script sample
Query = "SELECT * FROM MSBTS_HostInstance WHERE HostName =""" & HostName & """ AND RunningServer = """ & FailoverServerName & """"
Set ObjWMIService = GetObject("winmgmts://./root/MicrosoftBizTalkServer")
Set InstSet2 = objWMIService.ExecQuery(Query)if InstSet2.Count > 0 Then
For Each Inst2 In InstSet2
If 4 <> Inst2.ServiceState Then
Inst2.IsDisabled=False
Inst2.Start
endif
next
end ifIf I run this script, the Start method always fails with error "Instance disabled". as per MSDN doc, I made sure than the instances of the host are stopped before amending, but stil no luck.
Funny bit is that echo the properties .isdisabled after setting will return false, but .start method does not seem to agree 🙂
Do I miss somethings there ?
Thanks.
Chris
-
October 30, 2006 at 7:52 AM #16250
Apparently, my issue is due to some remote access issue. In my first tests, the secondary server, hosting the host to be enabled and started was a remote machine.
I tried the server on the server hosting the host, and now, the scripts works. Not perfect, but I'm going somewhere.If anyone knows how to make it works from another machine, will make me happy 🙂 (I thought could be DCOM/COM issue, but the remote server does not show any error / logs).
thanks,
Chris
-
October 4, 2012 at 9:41 AM #25873
Did you manage to fix this problem?
-
July 8, 2015 at 10:02 PM #26522
Yes, this work, if we want to disable the host instance, no matters if host instance is started or stopped. But it doesn't enable the host instance, if I set Is Disabled property to false. Don't know why:(
-
December 1, 2016 at 3:45 AM #26592
How you are doing it from remote machine?? Please let me know the cmdlet you are using or the full command.
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.