This example shows how to use the New-MgDeviceManagementVirtualEndpointOnPremiseConnection Cmdlet.
Parameters
-AdditionalProperties
Additional Parameters
Parameter properties
Type:
System.Collections.Hashtable
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AdDomainName
The fully qualified domain name (FQDN) of the Active Directory domain you want to join.
Maximum length is 255.
Optional.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AdDomainPassword
The password associated with the username of an Active Directory account (adDomainUsername).
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AdDomainUsername
The username of an Active Directory account (user or service account) that has permission to create computer objects in Active Directory.
Required format: admin@contoso.com.
Optional.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AlternateResourceUrl
The interface URL of the partner service's resource that links to this Azure network connection.
Requires $select to retrieve.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-BodyParameter
cloudPcOnPremisesConnection
To construct, see NOTES section for BODYPARAMETER properties and create a hash table.
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type:
System.Management.Automation.SwitchParameter
Supports wildcards:
False
DontShow:
False
Aliases:
cf
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ConnectionType
cloudPcOnPremisesConnectionType
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DisplayName
The display name for the Azure network connection.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Headers
Optional headers that will be added to the request.
Parameter properties
Type:
System.Collections.IDictionary
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-HealthCheckPaused
Indicates whether regular health checks on the network or domain configuration are paused or active.
false if the regular health checks on the network or domain configuration are currently active.
true if the checks are paused.
If you perform a create or update operation on a onPremisesNetworkConnection resource, this value is set to false for four weeks.
If you retry a health check on network or domain configuration, this value is set to false for two weeks.
If the onPremisesNetworkConnection resource is attached in a provisioningPolicy or used by a Cloud PC in the past four weeks, healthCheckPaused is set to false.
Read-only.
Default is false.
Parameter properties
Type:
System.Management.Automation.SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-HealthCheckStatus
cloudPcOnPremisesConnectionStatus
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-HealthCheckStatusDetail
cloudPcOnPremisesConnectionStatusDetail
To construct, see NOTES section for HEALTHCHECKSTATUSDETAIL properties and create a hash table.
When true, the Azure network connection is in use.
When false, the connection isn't in use.
You can't delete a connection that’s in use.
Returned only on $select.
For an example that shows how to get the inUse property, see Example 2: Get the selected properties of an Azure network connection, including healthCheckStatusDetail.
Read-only.
Parameter properties
Type:
System.Management.Automation.SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InUseByCloudPc
Indicates whether a Cloud PC is using this on-premises network connection.
true if at least one Cloud PC is using it.
Otherwise, false.
Read-only.
Default is false.
Parameter properties
Type:
System.Management.Automation.SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-OrganizationalUnit
The organizational unit (OU) in which the computer account is created.
If left null, the OU configured as the default (a well-known computer object container) in the tenant's Active Directory domain (OU) is used.
Optional.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Proxy
The URI for the proxy server to use
Parameter properties
Type:
System.Uri
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ProxyCredential
Credentials for a proxy server to use for the remote call
Parameter properties
Type:
System.Management.Automation.PSCredential
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ProxyUseDefaultCredentials
Use the default credentials for the proxy
Parameter properties
Type:
System.Management.Automation.SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ResourceGroupId
The unique identifier of the target resource group used associated with the on-premises network connectivity for Cloud PCs.
Required format: '/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}'
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ResponseHeadersVariable
Optional Response Headers Variable.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Aliases:
RHV
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ScopeIds
The scope IDs of the corresponding permission.
Currently, it's the Intune scope tag ID.
Parameter properties
Type:
System.String[]
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SubnetId
The unique identifier of the target subnet used associated with the on-premises network connectivity for Cloud PCs.
Required format: '/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkId}/subnets/{subnetName}'
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SubscriptionId
The unique identifier of the Azure subscription associated with the tenant.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SubscriptionName
The name of the Azure subscription is used to create an Azure network connection.
Read-only.
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VirtualNetworkId
The unique identifier of the target virtual network used associated with the on-premises network connectivity for Cloud PCs.
Required format: '/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VirtualNetworkLocation
Indicates the resource location of the target virtual network.
For example, the location can be eastus2, westeurope, etc.
Read-only (computed value).
Parameter properties
Type:
System.String
Supports wildcards:
False
DontShow:
False
Parameter sets
CreateExpanded
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-WhatIf
Runs the command in a mode that only reports what would happen without performing the actions.
Parameter properties
Type:
System.Management.Automation.SwitchParameter
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
To create the parameters described below, construct a hash table containing the appropriate properties.
For information on hash tables, run Get-Help about_Hash_Tables.
BODYPARAMETER <IMicrosoftGraphCloudPcOnPremisesConnection>: cloudPcOnPremisesConnection
[(Any) <Object>]: This indicates any property can be added to this object.
[Id <String>]: The unique identifier for an entity.
Read-only.
[AdDomainName <String>]: The fully qualified domain name (FQDN) of the Active Directory domain you want to join.
Maximum length is 255.
Optional.
[AdDomainPassword <String>]: The password associated with the username of an Active Directory account (adDomainUsername).
[AdDomainUsername <String>]: The username of an Active Directory account (user or service account) that has permission to create computer objects in Active Directory.
Required format: admin@contoso.com.
Optional.
[AlternateResourceUrl <String>]: The interface URL of the partner service's resource that links to this Azure network connection.
Requires $select to retrieve.
[ConnectionType <String>]: cloudPcOnPremisesConnectionType
[DisplayName <String>]: The display name for the Azure network connection.
[HealthCheckPaused <Boolean?>]: Indicates whether regular health checks on the network or domain configuration are paused or active.
false if the regular health checks on the network or domain configuration are currently active.
true if the checks are paused.
If you perform a create or update operation on a onPremisesNetworkConnection resource, this value is set to false for four weeks.
If you retry a health check on network or domain configuration, this value is set to false for two weeks.
If the onPremisesNetworkConnection resource is attached in a provisioningPolicy or used by a Cloud PC in the past four weeks, healthCheckPaused is set to false.
Read-only.
Default is false.
[HealthCheckStatus <String>]: cloudPcOnPremisesConnectionStatus
[HealthCheckStatusDetail <IMicrosoftGraphCloudPcOnPremisesConnectionStatusDetail>]: cloudPcOnPremisesConnectionStatusDetail
[(Any) <Object>]: This indicates any property can be added to this object.
[EndDateTime <DateTime?>]: The end time of the connection health check.
The Timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC).
For example, midnight UTC on Jan 1, 2014 appears as 2014-01-01T00:00:00Z.
Read-Only.
[HealthChecks <IMicrosoftGraphCloudPcOnPremisesConnectionHealthCheck[]>]: A list of all checks that have been run on the connection.
Read-Only.
[AdditionalDetail <String>]: Additional details about the health check or the recommended action.
For exmaple, the string value can be download.microsoft.com:443;software-download.microsoft.com:443; Read-only.
[CorrelationId <String>]: The unique identifier of the health check item-related activities.
This identifier can be useful in troubleshooting.
[DisplayName <String>]: The display name for this health check item.
[EndDateTime <DateTime?>]: The value cannot be modified and is automatically populated when the health check ends.
The Timestamp type represents date and time information using ISO 8601 format and is in Coordinated Universal Time (UTC).
For example, midnight UTC on Jan 1, 2024 would look like this: '2024-01-01T00:00:00Z'.
Returned by default.
Read-only.
[ErrorType <String>]: cloudPcOnPremisesConnectionHealthCheckErrorType
[RecommendedAction <String>]: The recommended action to fix the corresponding error.
For example, The Active Directory domain join check failed because the password of the domain join user has expired.
Read-Only.
[StartDateTime <DateTime?>]: The value cannot be modified and is automatically populated when the health check starts.
The Timestamp type represents date and time information using ISO 8601 format and is in Coordinated Universal Time (UTC).
For example, midnight UTC on Jan 1, 2024 would look like this: '2024-01-01T00:00:00Z'.
Returned by default.
Read-only.
[Status <String>]: cloudPcOnPremisesConnectionStatus
[StartDateTime <DateTime?>]: The start time of the health check.
The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC).
For example, midnight UTC on Jan 1, 2014 appear as 2014-01-01T00:00:00Z.
Read-Only.
[InUse <Boolean?>]: When true, the Azure network connection is in use.
When false, the connection isn't in use.
You can't delete a connection that’s in use.
Returned only on $select.
For an example that shows how to get the inUse property, see Example 2: Get the selected properties of an Azure network connection, including healthCheckStatusDetail.
Read-only.
[InUseByCloudPc <Boolean?>]: Indicates whether a Cloud PC is using this on-premises network connection.
true if at least one Cloud PC is using it.
Otherwise, false.
Read-only.
Default is false.
[OrganizationalUnit <String>]: The organizational unit (OU) in which the computer account is created.
If left null, the OU configured as the default (a well-known computer object container) in the tenant's Active Directory domain (OU) is used.
Optional.
[ResourceGroupId <String>]: The unique identifier of the target resource group used associated with the on-premises network connectivity for Cloud PCs.
Required format: '/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}'
[ScopeIds <String[]>]: The scope IDs of the corresponding permission.
Currently, it's the Intune scope tag ID.
[SubnetId <String>]: The unique identifier of the target subnet used associated with the on-premises network connectivity for Cloud PCs.
Required format: '/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkId}/subnets/{subnetName}'
[SubscriptionId <String>]: The unique identifier of the Azure subscription associated with the tenant.
[SubscriptionName <String>]: The name of the Azure subscription is used to create an Azure network connection.
Read-only.
[VirtualNetworkId <String>]: The unique identifier of the target virtual network used associated with the on-premises network connectivity for Cloud PCs.
Required format: '/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'
[VirtualNetworkLocation <String>]: Indicates the resource location of the target virtual network.
For example, the location can be eastus2, westeurope, etc.
Read-only (computed value).
HEALTHCHECKSTATUSDETAIL <IMicrosoftGraphCloudPcOnPremisesConnectionStatusDetail>: cloudPcOnPremisesConnectionStatusDetail
[(Any) <Object>]: This indicates any property can be added to this object.
[EndDateTime <DateTime?>]: The end time of the connection health check.
The Timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC).
For example, midnight UTC on Jan 1, 2014 appears as 2014-01-01T00:00:00Z.
Read-Only.
[HealthChecks <IMicrosoftGraphCloudPcOnPremisesConnectionHealthCheck[]>]: A list of all checks that have been run on the connection.
Read-Only.
[AdditionalDetail <String>]: Additional details about the health check or the recommended action.
For exmaple, the string value can be download.microsoft.com:443;software-download.microsoft.com:443; Read-only.
[CorrelationId <String>]: The unique identifier of the health check item-related activities.
This identifier can be useful in troubleshooting.
[DisplayName <String>]: The display name for this health check item.
[EndDateTime <DateTime?>]: The value cannot be modified and is automatically populated when the health check ends.
The Timestamp type represents date and time information using ISO 8601 format and is in Coordinated Universal Time (UTC).
For example, midnight UTC on Jan 1, 2024 would look like this: '2024-01-01T00:00:00Z'.
Returned by default.
Read-only.
[ErrorType <String>]: cloudPcOnPremisesConnectionHealthCheckErrorType
[RecommendedAction <String>]: The recommended action to fix the corresponding error.
For example, The Active Directory domain join check failed because the password of the domain join user has expired.
Read-Only.
[StartDateTime <DateTime?>]: The value cannot be modified and is automatically populated when the health check starts.
The Timestamp type represents date and time information using ISO 8601 format and is in Coordinated Universal Time (UTC).
For example, midnight UTC on Jan 1, 2024 would look like this: '2024-01-01T00:00:00Z'.
Returned by default.
Read-only.
[Status <String>]: cloudPcOnPremisesConnectionStatus
[StartDateTime <DateTime?>]: The start time of the health check.
The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC).
For example, midnight UTC on Jan 1, 2014 appear as 2014-01-01T00:00:00Z.
Read-Only.