可以使用Test-NetConnection命令的"-Ping"参数来检查目标主机的可达性。例如,检查目标主机是否可达:Test-NetConnection -ComputerName example.com -Ping。 端口不可访问:如果目标主机的特定端口不可访问,可能是由于防火墙或网络配置问题。可以通过检查防火墙规则和网络配置来解决。可以使用Test-NetCo
Example 1: Send echo requests to a remote computer This example sends echo request packets from the local computer to the Server01 computer. PowerShell Test-Connection-TargetNameServer01-IPv4Destination: Server01 Ping Source Address Latency BufferSize Status (ms) (B) --- --- --- --- ---...
在此範例中 Test-Connection,Cmdlet 會傳回擴充類型。 您可以使用 PSTypeName 屬性,將參數的類型限制為擴充類型。 PowerShell 複製 function TestType { param( [PSTypeName('Microsoft.PowerShell.Commands.TestConnectionCommand+PingMtuStatus')] [psobject]$MtuStatus ) $MtuStatus } $mtu = Test...
Test-PopConnectivity[[-ClientAccessServer] <ServerIdParameter>] [-Confirm] [-ConnectionType <ProtocolConnectionType>] [-DomainController <Fqdn>] [-LightMode] [-MailboxCredential <PSCredential>] [-MailboxServer <ServerIdParameter>] [-MonitoringContext] [-PerConnectionTimeout <Int32>] [-PortClientAc...
Windows PowerShell 3.0 包含現有 Cmdlet (包括簡化語法) 的新功能,以及下列 Cmdlet 的新參數:Computer Cmdlet、CSV Cmdlet、Get-ChildItem、Get-Command、Get-Content、Get-History、Measure-Object、Security Cmdlet、Select-Object、Select-String、Split-Path、Start-Process、Tee-Object、Test-Connection、Add-Member ...
Test-ImapConnectivity [[-ClientAccessServer] <ServerIdParameter>] [-Confirm] [-ConnectionType <ProtocolConnectionType>] [-DomainController <Fqdn>] [-LightMode] [-MailboxCredential <PSCredential>] [-MailboxServer <ServerIdParameter>] [-MonitoringContext] [-PerConnectionTimeout <Int32>] [-PortClient...
Example 1PowerShell Copy Test-WebServicesConnectivity -AllowUnsecureAccessIn Exchange 2010, this example tests Exchange Web Services on the local Client Access server and allows the test to use an unsecured connection that doesn't require SSL. A default test account is used....
可以通过使用 DSC 配置脚本设置服务来简化请求服务器部署。 本文档包含可以用于部署生产准备就绪服务器节点的配置脚本。 若要使用配置脚本,需要一个未包含在 Windows Server 中的 DSC 模块。 所需模块名称是xPSDesiredStateConfiguration,其中包括 DSC 资源xDscWebService。 可以从PowerShell 库下载 xPSDesiredStateConfigu...
升级前,您可以使用 Test-SPContentDatabase cmdlet 检查 Share Server2007 数据库当前是否有问题或是否有潜在问题,例如孤立的数据、缺少网站定义、缺少功能或程序集。该 cmdlet 可以补充第 22 章中提到的升级前检查工具报告。检查这些问题不会中断安装 SharePoint,并且该cmdlet 还可以测试 SharePoint 2010 数据库的...
$out = 1..254|% -Parallel {select @{N=’Address’;E={(‘10.22.14.’+(“{0:d3}” -f $_))}}, @{N=’OpenPort’;E={Test-Connection -ComputerName (‘10.22.14.’+$_) -TcpPort 3389}}, @{N=’Port’;E={‘3389’}}} It runs pretty slow w/o -Parallel, but it finishes ...