Tests WMI connectivity to a remote server.
Syntax
Parameter Set: Default
Test-WebSitesServer [[-Name] <String> ] [-ConnectionString
<String> ] [-Password <String> ] [-PipelineVariable
<String> ] [-UserName <String> ] [
<CommonParameters>]
The Test-WebSitesServer cmdlet tests WMI connectivity to a remote server using the credentials provided by the UserName and Password parameters.
Specifies a connecting string to a hosting database. If this parameter is not specified, the default instance of the hosting database is used.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of a server. This is the remote server against which you are testing the connection.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
Specifies a password.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
Specifies a variable to be used with the pipeline operator.
Aliases |
pv |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies a user name.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
This command tests the connection to WSERVER01 with the specified credentials. If the credentials are valid, True is returned, otherwise False is returned.
PS C:\> Test-WebSitesServer -Name "WSERVER01" -UserName "Administrator" -Password "Password01"
This command tests the connection to WSERVER01 with the specified credentials, stores the result in the $Result variable, and displays the result to the user. Because an incorrect password was used, the output is False.
PS C:\> $Result = Test-WebSitesServer -Name "WSERVER01" -UserName "Administrator" -Password "IncorrectPassword01" ; "Result is: $Result"
Result is: False