https://blog.csdn.net/wenzhongxiang/article/details/79256937
Powershell查询IP地址及主机名信息:
1.foreach($ipv4 in (ipconfig) -like '*IPv4*') { ($ipv4 -split ' : ')[-1]}
2.Get-WMIObject Win32_ComputerSystem |select Name
3.$env:COMPUTERNAME
批处理命令获取ip地址:
http://blog.51cto.com/hooden/1949416
powershell获取ip地址命令:
http://www.pstips.net/get-all-assigned-ip-addresses.html
[net.dns]::GetHostAddresses('') | select -ExpandProperty IPAddressToString
PS C:\Users\test001> [net.dns]::GetHostAddresses('') | select -ExpandProperty IPAddressToString | select -index 1
POWERshell命令讲解
https://www.cnblogs.com/lavender000/p/6935589.html
执行powershell脚本
http://www.pstips.net/powershell-invoking-files-and-scripts.html
Powershell拥有自己的脚本,扩展名为“.ps1”
powershell编写和运行脚本
http://www.pstips.net/powershell-create-and-start-scripts.html
POWERshell命令讲解
https://www.pstips.net/powershell-define-variable.html