-If the module connects to an external service, define a [connection type](#adding-a-connection-type-to-your-module). Each cmdlet in the module should accept a connection object (an instance of that connection type) as a parameter. Users map parameters of the connection asset to the cmdlet's corresponding parameters each time they call a cmdlet. The following runbook example, based on the example in the previous section, uses a Contoso connection asset called `ContosoConnection`. This asset accesses Contoso resources and returns data from the external service. In this example, the fields are mapped to the `UserName` and `Password` properties of a `PSCredential` object, and then passed to the cmdlet.
0 commit comments