WMI(MSBTS_ReceivePort.Name 속성)
수신 포트의 이름을 포함합니다.
표시된 구문은 언어 중립적입니다.
구문
string Name;
설명
인스턴스를 만들려면 이 속성이 필요합니다. 이 속성은 인스턴스를 만들 때만 쓰기 가능합니다. 인스턴스를 만든 후에 이 속성은 읽기 전용이 됩니다.
이 속성에는 키 한정자 가 있습니다. MgmtDbNameOverride 및 MgmtDbServerOverride와 함께 이 키는 클래스에 대한 복합 키를 형성합니다.
이 속성의 최대 길이는 256자입니다.
이 속성은 관리되는 Microsoft.BizTalk.ExplorerOM.ReceivePort.Name 속성을 래핑합니다.
예제
다음 예제는 SDK\Samples\Admin\WMI\Remove Receive Port\VBScript\RemoveReceivePort.vbs 파일에서 가져온 것입니다.
Sub RemoveReceivePort()
'Get the command line arguments entered for the script
Dim objArgs: Set objArgs = WScript.Arguments
'error handling is done by explicity checking the err object rather than using
'the VB ON ERROR construct, so set to resume next on error.
On Error Resume Next
'Make sure the expected number of arguments were provided on the command line.
'if not, print usage text and exit.
If (objArgs.Count <> 1) Then
PrintUsage()
WScript.Quit 0
End If
Dim objInstSet, objInst, strQuery
Dim strReceivePortName
strReceivePortName = objArgs(0)
'set up a WMI query to acquire a list of receive locations with the given Name and
'ReceivePortName key values. This should be a list of zero or one Receive Locations.
strQuery = "SELECT * FROM MSBTS_ReceivePort WHERE Name =""" & strReceivePortName & """"
Set objInstSet = GetObject("Winmgmts:!root\MicrosoftBizTalkServer").ExecQuery(strQuery)
'Check for error condition before continuing.
If Err <> 0 Then
PrintWMIErrorThenExit Err.Description, Err.Number
End If
'If Receive Location found, enable it, otherwise print error and end.
If objInstSet.Count > 0 then
For Each objInst in objInstSet
'Now remove the receive port
objInst.Delete_()
If Err <> 0 Then
PrintWMIErrorThenExit Err.Description, Err.Number
End If
WScript.Echo "The Receive Port was successfully removed."
Next
Else
WScript.Echo "No Receive Port was found matching that Name."
End If
End Sub
C# 예제는 제공되지 않습니다.
요구 사항
헤더: BTSWMISchema2K.mof 또는 BTSWMISchemaXP.mof에 선언되어 있습니다.
네임스페이스: \root\MicrosoftBizTalkServer에 포함되어 있습니다.