> ## Documentation Index
> Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CSharp: WinrmProvisionerConnection

> CDKTN Core API Reference for WinrmProvisionerConnection in CSharp.

Most provisioners require access to the remote resource via SSH or WinRM and expect a nested connection block with details about how to connect.

See [connection](https://developer.hashicorp.com/terraform/language/resources/provisioners/connection)

## Initializer <a name="Initializer" id="cdktn.WinrmProvisionerConnection.Initializer" />

```csharp theme={null}
using Io.Cdktn;

new WinrmProvisionerConnection {
    string Host,
    string Type,
    string Cacert = null,
    bool Https = null,
    bool Insecure = null,
    string Password = null,
    double Port = null,
    string ScriptPath = null,
    string Timeout = null,
    bool UseNtlm = null,
    string User = null
};
```

## Properties <a name="Properties" id="Properties" />

| **Name**                                                                                    | **Type**            | **Description**                                                                                                                                                             |
| ------------------------------------------------------------------------------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.host">Host</a></code>             | <code>string</code> | The address of the resource to connect to.                                                                                                                                  |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.type">Type</a></code>             | <code>string</code> | The connection type.                                                                                                                                                        |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.cacert">Cacert</a></code>         | <code>string</code> | The CA certificate to validate against.                                                                                                                                     |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.https">Https</a></code>           | <code>bool</code>   | Set to true to connect using HTTPS instead of HTTP.                                                                                                                         |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.insecure">Insecure</a></code>     | <code>bool</code>   | Set to true to skip validating the HTTPS certificate chain.                                                                                                                 |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.password">Password</a></code>     | <code>string</code> | The password to use for the connection.                                                                                                                                     |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.port">Port</a></code>             | <code>double</code> | The port to connect to.                                                                                                                                                     |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.scriptPath">ScriptPath</a></code> | <code>string</code> | The path used to copy scripts meant for remote execution.                                                                                                                   |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.timeout">Timeout</a></code>       | <code>string</code> | The timeout to wait for the connection to become available.                                                                                                                 |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.useNtlm">UseNtlm</a></code>       | <code>bool</code>   | Set to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest. |
| <code><a href="#cdktn.WinrmProvisionerConnection.property.user">User</a></code>             | <code>string</code> | The user to use for the connection.                                                                                                                                         |

***

### `Host`<sup>Required</sup> <a name="Host" id="cdktn.WinrmProvisionerConnection.property.host" />

```csharp theme={null}
public string Host { get; set; }
```

* *Type:* string

The address of the resource to connect to.

***

### `Type`<sup>Required</sup> <a name="Type" id="cdktn.WinrmProvisionerConnection.property.type" />

```csharp theme={null}
public string Type { get; set; }
```

* *Type:* string

The connection type.

Valid values are "ssh" and "winrm".
Provisioners typically assume that the remote system runs Microsoft Windows when using WinRM.
Behaviors based on the SSH target\_platform will force Windows-specific behavior for WinRM, unless otherwise specified.

***

### `Cacert`<sup>Optional</sup> <a name="Cacert" id="cdktn.WinrmProvisionerConnection.property.cacert" />

```csharp theme={null}
public string Cacert { get; set; }
```

* *Type:* string

The CA certificate to validate against.

***

### `Https`<sup>Optional</sup> <a name="Https" id="cdktn.WinrmProvisionerConnection.property.https" />

```csharp theme={null}
public bool Https { get; set; }
```

* *Type:* bool

Set to true to connect using HTTPS instead of HTTP.

***

### `Insecure`<sup>Optional</sup> <a name="Insecure" id="cdktn.WinrmProvisionerConnection.property.insecure" />

```csharp theme={null}
public bool Insecure { get; set; }
```

* *Type:* bool

Set to true to skip validating the HTTPS certificate chain.

***

### `Password`<sup>Optional</sup> <a name="Password" id="cdktn.WinrmProvisionerConnection.property.password" />

```csharp theme={null}
public string Password { get; set; }
```

* *Type:* string

The password to use for the connection.

***

### `Port`<sup>Optional</sup> <a name="Port" id="cdktn.WinrmProvisionerConnection.property.port" />

```csharp theme={null}
public double Port { get; set; }
```

* *Type:* double
* *Default:* 22

The port to connect to.

***

### `ScriptPath`<sup>Optional</sup> <a name="ScriptPath" id="cdktn.WinrmProvisionerConnection.property.scriptPath" />

```csharp theme={null}
public string ScriptPath { get; set; }
```

* *Type:* string

The path used to copy scripts meant for remote execution.

Refer to [How Provisioners Execute Remote Scripts below for more details](https://developer.hashicorp.com/terraform/language/resources/provisioners/connection#how-provisioners-execute-remote-scripts)

***

### `Timeout`<sup>Optional</sup> <a name="Timeout" id="cdktn.WinrmProvisionerConnection.property.timeout" />

```csharp theme={null}
public string Timeout { get; set; }
```

* *Type:* string
* *Default:* 5m

The timeout to wait for the connection to become available.

Should be provided as a string (e.g., "30s" or "5m".)

***

### `UseNtlm`<sup>Optional</sup> <a name="UseNtlm" id="cdktn.WinrmProvisionerConnection.property.useNtlm" />

```csharp theme={null}
public bool UseNtlm { get; set; }
```

* *Type:* bool

Set to true to use NTLM authentication rather than default (basic authentication), removing the requirement for basic authentication to be enabled within the target guest.

Refer to Authentication for Remote Connections in the Windows App Development documentation for more details.

***

### `User`<sup>Optional</sup> <a name="User" id="cdktn.WinrmProvisionerConnection.property.user" />

```csharp theme={null}
public string User { get; set; }
```

* *Type:* string
* *Default:* root

The user to use for the connection.

***
