New-SmaConnection
Applies To: System Center 2012 R2 Orchestrator, Windows Azure Pack for Windows Server
New-SmaConnection
Creates a connection instance in Service Management Automation.
Syntax
Parameter Set: Default
New-SmaConnection -ConnectionTypeName <String> -Name <String> -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-ConnectionFieldValues <Hashtable> ] [-Credential <PSCredential> ] [-Description <String> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The New-SmaConnection cmdlet creates a connection instance in Service Management Automation.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the Credential parameter.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
Windows |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ConnectionFieldValues<Hashtable>
Specifies a hash table that contains key/value pairs. The keys represent the connection fields on the specified connection type. The values represent the specific values to store for each connection field for the connection instance.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ConnectionTypeName<String>
Specifies a connection type.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential
.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Description<String>
Specifies a description for the connection.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies a name for the connection.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the protocol, for example, http:// or https://.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Create a connection
This command creates a connection named MyConnection by using the Name, ConnectionTypeName, and ConnectionFieldValues parameters.
PS C:\> New-SmaConnection -WebServiceEndpoint "https://contoso.com/app01" -Name "MyConnection" -ConnectionTypeName "MyConnectionType" -Description "This is a new connection" -ConnectionFieldValues @{ "Hostname"="Computer01"; "Username"="SarahJones"; Password="passw0rd!"}