微軟資格認(rèn)證考試綜合輔導(dǎo):怎樣啟用和使用WinRM?

字號:

如果你正使用Windows 2008 Server,WinRM已經(jīng)被安裝但并未啟用。 這是一個很好的安全預(yù)防措施。 在你機器上啟用WinRM的簡單方法就是在CMD中運行:
    winrm enumerate winrm/config/listener
    如果沒有得到返回信息,WinRM未正常運行。 配置WinRM自動啟動并允許遠(yuǎn)程訪問,可像以下這樣使用winrm quickconfig命令 :
    C:\Users\Administrator> winrm quickconfig
    WinRM is not set up to allow remote access to this machine for management.
    The following changes must be made:
    Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
    Make these changes [y/n]? y
    WinRM has been updated for remote management.
    Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
    C:\Users\Administrator>
    Once I configured the quickconfig, I reran the enumeration command with these results:
    C:\Users\Administrator> winrm e winrm/config/listener
    Listener
    Address = *
    Transport = HTTP
    Port = 80
    Hostname
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 10.253.15.98, 127.0.0.1, ::1, fe80::5efe:10.253.15.98%11, fe80::9583:2148:e1ef:6444%10
    C:\Users\Administrator>
    從這里,我們可以知道WinRM已經(jīng)啟動。
    考試大提示:如果你想在任何時間禁用WinRM,你可以使用這樣的命令:
    winrm delete winrm/config/listener?IPAdress=*+Transport=HTTP
    為了使用WinRM,與之連接的主機必需與WinRM主機是相同域的成員。 如果情況不是這樣,我建議你參考文章“Remotely managing your Server Core using WinRM and WinRS里描述的不同安全情況。