批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程
[批处理文件精品]批处理版照片整理器[批处理文件精品]纯批处理备份&还原驱动在线第三方下载
返回列表 发帖

[转载代码] [PowerShell每日技巧]使用完整主机名(20140213)

When you try PowerShell Remoting, you may run into connection errors just because your machine name was not fully qualified. Kerberos authentication may or may not needs this, depending on your DNS configuration.

So maybe you get errors when you try and connect like this:
  1. Enter-PSSession -ComputerName storage1
复制代码
When that happens, try and ask DNS for the fully qualified name:
  1. [System.Net.DNS]::GetHostByName('storage1').HostName
复制代码
Then, try this name instead. If remoting is enabled and set up correctly, you should now be able to connect.

http://powershell.com/cs/blogs/tips/archive/2014/02/13/using-fully-qualified-names-in-remoting.aspx

  1. $env:COMPUTERNAME + '.' + $env:USERDNSDOMAIN
复制代码
【批处理在线视频分享】http://bbs.bathome.net/thread-31727-1-1.html
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html

我帮忙写的代码不需要付钱,不用找我要支付宝或微信账号。如果一定要给,请到微信群给大家发红吧。

TOP

返回列表