Powershell to manipulate host file

后端 未结 9 1742
我在风中等你
我在风中等你 2021-01-30 02:32

I am looking at to see if I can create powershell script to update the contents in the host file.

Anybody know if there are any examples that manipulate the host file u

9条回答
  •  逝去的感伤
    2021-01-30 02:52

    The Carbon module has a Set-HostsEntry function for setting a hosts entry:

    Set-HostsEntry -IPAddress 10.2.3.4 -HostName 'myserver' -Description "myserver's IP address"
    

提交回复
热议问题