|
WMI Fun !! 〜 WMIに興味がある方・システム管理者必見!! 〜 WMI StepWMI SampleWMI ReferenceWMI LibraryMy Let'snotePersonalLinkAbout WMI Fun !! |
|
|
|
WMI Fun !! > WMI Sample (VBS) > WindowsファイアウォールのICMP設定をする |
|
|
Panasonic Let'snoteを長年愛用しています、その理由はMy Let'snoteで…
インクを買うよりもしかしたら安い?インクジェット複合機Canon PIXUS MP493 ビジネスにパソコンを活用する為のバイブル、 WindowsファイアウォールのICMP設定をする: HNet_FwIcmpSettings - WMI Sample (VBS)Topics
WindowsファイアウォールのICMP(Internet Control Message Protocol)設定を行うサンプルプログラムです。名前空間は「Root\Microsoft\HomeNet」、クラスが「Hnet_FwIcmpSettings」になります。
Sample Code
Option Explicit
'WMIにて使用する各種オブジェクトを定義・生成する。 Dim oClassSet Dim oClass Dim oLocator Dim oService Dim sMesStr 'ローカルコンピュータに接続する。 Set oLocator = WScript.CreateObject("WbemScripting.SWbemLocator") Set oService = oLocator.ConnectServer(, "Root\Microsoft\HomeNet") 'クエリー条件をWQLにて指定する。 Set oClassSet = oService.ExecQuery("Select * From HNet_FwIcmpSettings") 'コレクションを解析する。 For Each oClass In oClassSet oClass.AllowInboundEchoRequest = "True" oClass.Put_ Next MsgBox "エコー要求の着信の設定を有効にしました。" '使用した各種オブジェクトを後片付けする。 Set oClassSet = Nothing Set oClass = Nothing Set oService = Nothing Set oLocator = Nothing
Comment
実行するとWindowsファイアウォールをICMPエコー(要するに一般的に言うPing)の着信に対して応答する設定に変更します。
を紹介しています。
Recommended book
個人的にお勧めする本の紹介です。
Latest sample information
最近WMI Sampleへ追加したサンプルのご紹介です。
|
|
ご意見・ご要望・ご感想をこちらのアンケートからお待ちしています |
| ∧ ページの先頭へ… |