### Start Virtual Machine Source: https://github.com/azure/azure-powershell/blob/main/src/NetworkCloud/NetworkCloud.Autorest/docs/Start-AzNetworkCloudVirtualMachine.md This example demonstrates how to start a virtual machine by providing its name, resource group, and subscription ID. ```APIDOC ## Start-AzNetworkCloudVirtualMachine ### Description Starts the specified virtual machine. ### Method POST ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/start ### Parameters #### Path Parameters - **virtualMachineName** (string) - Required - The name of the virtual machine. - **resourceGroupName** (string) - Required - The name of the resource group. The name is case insensitive. - **subscriptionId** (string) - Required - The ID of the target subscription. The value must be a UUID. ### Request Example ```powershell Start-AzNetworkCloudVirtualMachine -Name vmName -ResourceGroupName resourceGroup -SubscriptionId subscriptionId ``` ### Response #### Success Response (204 No Content) Indicates that the virtual machine start operation was successful. #### Error Response - **400 Bad Request** - **404 Not Found** - **409 Conflict** ``` -------------------------------- ### List snapshots matching a pattern Source: https://github.com/azure/azure-powershell/blob/main/src/Compute/Compute/help/Get-AzSnapshot.md This example gets all snapshots that start with "SnapshotName". ```APIDOC ## Get-AzSnapshot -SnapshotName "SnapshotName*" ### Description Gets all snapshots that start with "SnapshotName". ### Parameters #### Path Parameters - **SnapshotName** (string) - Required - The name of the snapshot. Wildcard characters are supported. ### Request Example ```powershell Get-AzSnapshot -SnapshotName "SnapshotName*" ``` ### Response #### Success Response (200) - **ResourceGroupName** (string) - The name of the resource group. - **SnapshotName** (string) - The name of the snapshot. - **OsType** (string) - The operating system type of the snapshot. - **DiskSizeGB** (integer) - The size of the disk in gigabytes. - **TimeCreated** (DateTime) - The date and time the snapshot was created. - **ProvisioningState** (string) - The provisioning state of the snapshot. - **Location** (string) - The location of the snapshot. #### Response Example ```json [ { "ResourceGroupName": "ResourceGroupName1", "SnapshotName": "SnapshotName1", "OsType": "Windows", "DiskSizeGB": 127, "TimeCreated": "4/10/2018 7:05:42 PM", "ProvisioningState": "Succeeded", "Location": "westus2" }, { "ResourceGroupName": "ResourceGroupName1", "SnapshotName": "SnapshotName2", "OsType": "Windows", "DiskSizeGB": 127, "TimeCreated": "4/10/2018 7:05:42 PM", "ProvisioningState": "Succeeded", "Location": "westus2" }, { "ResourceGroupName": "ResourceGroupName2", "SnapshotName": "SnapshotName3", "OsType": "Windows", "DiskSizeGB": 127, "TimeCreated": "4/10/2018 7:05:42 PM", "ProvisioningState": "Succeeded", "Location": "westus2" } ] ``` ``` -------------------------------- ### Install Latest kubectl and Kubelogin Source: https://github.com/azure/azure-powershell/blob/main/src/Aks/Aks/help/Install-AzAksCliTool.md Installs the latest available versions of kubectl and kubelogin to their default locations. This is the simplest way to get started with the AKS CLI tools. ```powershell Install-AzAksCliTool ``` -------------------------------- ### Start Virtual Machine Source: https://github.com/azure/azure-powershell/blob/main/src/NetworkCloud/NetworkCloud/help/Start-AzNetworkCloudVirtualMachine.md This example demonstrates how to start a virtual machine by providing its name and resource group. ```APIDOC ## Start-AzNetworkCloudVirtualMachine ### Description Starts the provided virtual machine. ### Method POST ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/start ### Parameters #### Path Parameters - **virtualMachineName** (String) - The name of the virtual machine. Required. - **resourceGroupName** (String) - The name of the resource group. Required. - **subscriptionId** (String) - The ID of the target subscription. Required. #### Query Parameters None #### Request Body None ### Request Example ```powershell Start-AzNetworkCloudVirtualMachine -Name vmName -ResourceGroupName resourceGroup -SubscriptionId subscriptionId ``` ### Response #### Success Response (204 No Content) Indicates the virtual machine start operation was successful. #### Response Example None (No content returned on success) ``` -------------------------------- ### Create a VMSS with various configurations Source: https://github.com/azure/azure-powershell/blob/main/src/Compute/Compute/help/New-AzVmss.md This example demonstrates creating a VMSS with specific configurations for OS profile, storage, networking, and extensions. It includes setting up IP configurations, load balancer integration, and image references. ```powershell $VMSSName = "vmss" + $RGName; $AdminUsername = "Admin01"; $AdminPassword = "p4ssw0rd@123" + $RGName; $PublisherName = "MicrosoftWindowsServer" $Offer = "WindowsServer" $Sku = "2012-R2-Datacenter" $Version = "latest" $VHDContainer = "https://" + $STOName + ".blob.core.windows.net/" + $VMSSName; $ExtName = "CSETest"; $Publisher = "Microsoft.Compute"; $ExtType = "BGInfo"; $ExtVer = "2.1"; #IP Config for the NIC $IPCfg = New-AzVmssIpConfig -Name "Test" ` -LoadBalancerInboundNatPoolsId $ExpectedLb.InboundNatPools[0].Id ` -LoadBalancerBackendAddressPoolsId $ExpectedLb.BackendAddressPools[0].Id ` -SubnetId $SubNetId; #VMSS Config $securityTypeStnd = "Standard"; $VMSS = New-AzVmssConfig -Location $LOC -SkuCapacity 2 -SkuName "Standard_E4-2ds_v4" -UpgradePolicyMode "Automatic" -SecurityType $securityTypeStnd ` | Add-AzVmssNetworkInterfaceConfiguration -Name "Test" -Primary $True -IPConfiguration $IPCfg ` | Add-AzVmssNetworkInterfaceConfiguration -Name "Test2" -IPConfiguration $IPCfg ` | Set-AzVmssOsProfile -ComputerNamePrefix "Test" -AdminUsername $AdminUsername -AdminPassword $AdminPassword ` | Set-AzVmssStorageProfile -Name "Test" -OsDiskCreateOption 'FromImage' -OsDiskCaching "None" ` -ImageReferenceOffer $Offer -ImageReferenceSku $Sku -ImageReferenceVersion $Version ` -ImageReferencePublisher $PublisherName -VhdContainer $VHDContainer ` | Add-AzVmssExtension -Name $ExtName -Publisher $Publisher -Type $ExtType -TypeHandlerVersion $ExtVer -AutoUpgradeMinorVersion $True #Create the VMSS New-AzVmss -ResourceGroupName $RGName -Name $VMSSName -VirtualMachineScaleSet $VMSS; ``` -------------------------------- ### Get the payload of NewRelic agent on a VM. Source: https://github.com/azure/azure-powershell/blob/main/src/NewRelic/NewRelic.Autorest/examples/Invoke-AzNewRelicHostMonitor.md This example demonstrates how to get the payload required for installing the New Relic agent on a virtual machine using the Invoke-AzNewRelicHostMonitor cmdlet. ```APIDOC ## Invoke-AzNewRelicHostMonitor ### Description Retrieves the payload that needs to be passed in the request body for installing the New Relic agent on a VM. ### Method Invoke-AzNewRelicHostMonitor ### Parameters #### Path Parameters - **MonitorName** (string) - Required - The name of the monitor. - **ResourceGroupName** (string) - Required - The name of the resource group. ### Request Example ```powershell Invoke-AzNewRelicHostMonitor -MonitorName test-03 -ResourceGroupName ps-test ``` ### Response #### Success Response (200) - **payload** (string) - The payload for installing the New Relic agent. ``` -------------------------------- ### Start Link Connection and Get Detailed Status Source: https://github.com/azure/azure-powershell/blob/main/src/Synapse/Synapse/help/Start-AzSynapseLinkConnection.md This example starts a link connection and then immediately retrieves its detailed status. This is useful for monitoring the connection's state after initiating it. ```powershell Start-AzSynapseLinkConnection -WorkspaceName ContosoWorkspace -Name ContosoLinkConnection Get-AzSynapseLinkConnectionDetailedStatus -WorkspaceName ContosoWorkspace -Name ContosoLinkConnection ``` ```text WorkspaceName : ContosoWorkspace Id : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Name : ContosoLinkConnection IsApplyingChanges : IsPartiallyFailed : False StartTime : 2022-03-10T07:57:37.8730044Z StopTime : Status : Starting ContinuousRunId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Error : ``` -------------------------------- ### Set up a storage account for cloud service deployment Source: https://github.com/azure/azure-powershell/blob/main/src/CloudService/CloudService.Autorest/examples/New-AzCloudService.md This example shows how to create a storage account, which is a prerequisite for deploying a cloud service using the 'quickCreateParameterSetWithStorage' parameter set. ```powershell # Set up a storage account if you have not $storageAccount = New-AzStorageAccount -ResourceGroupName ContosoOrg -Name ContosoStorAcc -Location "East US" -SkuName "Standard_RAGRS" -Kind "StorageV2" ``` -------------------------------- ### Get Dynatrace Monitor VM Host Payload Source: https://github.com/azure/azure-powershell/blob/main/src/DynatraceObservability/DynatraceObservability.Autorest/examples/Get-AzDynatraceMonitorVMHostPayload.md This example demonstrates how to retrieve the payload required for installing the Dynatrace agent on a VM. The output contains the EnvironmentId and IngestionKey needed for the installation. ```APIDOC ## Get-AzDynatraceMonitorVMHostPayload ### Description Retrieves the payload that needs to be passed in the request body for installing Dynatrace agent on a VM. ### Method GET ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Dynatrace.Observability/monitors/{monitorName}/getVMHostPayload ### Parameters #### Path Parameters - **ResourceGroupName** (string) - Required - The name of the resource group. - **MonitorName** (string) - Required - The name of the Dynatrace monitor resource. ### Response #### Success Response (200) - **EnvironmentId** (string) - The Dynatrace environment ID. - **IngestionKey** (string) - The Dynatrace ingestion key. ``` -------------------------------- ### Start an SAP system and its underlying Virtual Machine(s) Source: https://github.com/azure/azure-powershell/blob/main/src/Workloads/SapVirtualInstance.Autorest/docs/Start-AzWorkloadsSapVirtualInstance.md This example demonstrates how to start an SAP system and its associated virtual machines using the Start-AzWorkloadsSapVirtualInstance cmdlet. It requires the SAP Virtual Instance name, the resource group name, and the -StartVM parameter to ensure the virtual machines are also started. ```APIDOC ## Start-AzWorkloadsSapVirtualInstance ### Description Starts the SAP system and its underlying Virtual Machine(s), that is ASCS instance and App servers of the system. ### Method POST ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/start ### Parameters #### Path Parameters - **sapVirtualInstanceName** (string) - Required - The name of the Virtual Instances for SAP solutions resource. - **resourceGroupName** (string) - Required - The name of the resource group. The name is case insensitive. - **subscriptionId** (string) - Optional - The ID of the target subscription. The value must be an UUID. Defaults to the current subscription ID. #### Query Parameters - **StartVM** (boolean) - Optional - The boolean value indicates whether to start the virtual machines before starting the SAP instances. - **NoWait** (boolean) - Optional - Run the command asynchronously. #### Request Body - **body** (IStartRequest) - Required - Start SAP instance(s) request body. ### Request Example ```powershell Start-AzWorkloadsSapVirtualInstance -Name DB0 -ResourceGroupName db0-vis-rg -StartVM ``` ### Response #### Success Response (200) - **Message** (string) - Operation status message. - **Status** (string) - Operation status. - **StartTime** (DateTime) - Operation start time. - **EndTime** (DateTime) - Operation end time. - **PercentComplete** (integer) - Percentage of operation completion. - **ResourceGroupName** (string) - The name of the resource group. - **Name** (string) - The name of the operation. - **Id** (string) - The ID of the operation. #### Response Example ```json { "AdditionalInfo": null, "Code": null, "Detail": null, "EndTime": "15-03-2023 09:11:00", "Id": "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/providers/Microsoft.Workloads/locations/CENTRALUSEUAP/operationStatuses/651c6f1b-db7b-46b2-ba9a-fb5ee67ec372*D9A8F8EF15D6E75CE64E8F442A39F1D7AF307793D262CE855530D335419055E3", "Message": null, "Name": "651c6f1b-db7b-46b2-ba9a-fb5ee67ec372*D9A8F8EF15D6E75CE64E8F442A39F1D7AF307793D262CE855530D335419055E3", "Operation": null, "PercentComplete": null, "ResourceGroupName": null, "StartTime": "15-03-2023 09:08:45", "Status": "Succeeded", "Target": null } ``` ``` -------------------------------- ### Get Service Principals by Display Name Source: https://github.com/azure/azure-powershell/blob/main/src/Resources/Resources/help/Get-AzADServicePrincipal.md This example retrieves service principals whose display names start with 'MyApp'. ```APIDOC ## Get-AzADServicePrincipal -DisplayNameBeginsWith "MyApp" ### Description Retrieves service principals based on a starting string for their display name. ### Method GET ### Endpoint /https://graph.microsoft.com/v1.0/servicePrincipals ### Parameters #### Query Parameters - **filter** (string) - Optional - Filter items by property values. For example, to filter by display name starting with 'MyApp', you could use `DisplayNameBeginsWith eq 'MyApp'`. ### Response #### Success Response (200) - **value** (array) - A list of service principal objects. - **displayName** (string) - The display name of the service principal. - **id** (string) - The unique identifier of the service principal. #### Response Example ```json { "value": [ { "displayName": "MyApp1", "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }, { "displayName": "MyApp2", "id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" } ] } ``` ``` -------------------------------- ### Start a batch of virtual machines immediately Source: https://github.com/azure/azure-powershell/blob/main/src/ComputeSchedule/ComputeSchedule.Autorest/examples/Invoke-AzComputeScheduleExecuteStart.md This example demonstrates how to start multiple virtual machines concurrently by providing a comma-separated list of their resource IDs. ```APIDOC ## Invoke-AzComputeScheduleExecuteStart ### Description Starts a batch of virtual machines immediately. ### Parameters #### Path Parameters - **Location** (string) - Required - The location of the virtual machines. - **CorrelationId** (string) - Optional - A unique identifier for the operation. - **ResourceId** (string[]) - Required - An array of resource IDs for the virtual machines to start. - **SubscriptionId** (string) - Required - The subscription ID. - **RetryCount** (int) - Optional - The number of retries for the operation. - **RetryWindowInMinutes** (int) - Optional - The window in minutes for retries. ### Request Example ```powershell Invoke-AzComputeScheduleExecuteStart -Location "eastus2euap" -CorrelationId "d8cae7b7-190f-4574-a793-7bffa7a1b4a8" -ResourceId "/subscriptions/ed5d2ee7-ede1-44bd-97a2-369489bbefe4/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/pwshtest85223", "/subscriptions/ed5d2ee7-ede1-44bd-97a2-369489bbefe4/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/pwshtest85129" -SubscriptionId "ed5d2ee7-ede1-44bd-97a2-369489bbefe4" -RetryCount 2 -RetryWindowInMinutes 30 | Format-List ``` ### Response #### Success Response (200) - **Description** (string) - Description of the operation. - **Location** (string) - The location of the resource. - **Result** (object) - The result of the operation, including retry policy, operation ID, resource ID, operation type, subscription ID, deadline, and state. - **Type** (string) - The type of the resource. ``` -------------------------------- ### Create a new lab. Source: https://github.com/azure/azure-powershell/blob/main/src/LabServices/LabServices/help/New-AzLabServicesLab.md This example demonstrates how to create a new lab with various configurations, including GPU drivers, admin credentials, auto-shutdown profiles, connection settings, image references, and SKU details. ```APIDOC ## New-AzLabServicesLab ### Description Operation to create a lab resource. ### Method POST ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName} ### Parameters #### Path Parameters - **labName** (string) - The name of the lab. - **resourceGroupName** (string) - The name of the resource group. Required. - **subscriptionId** (string) - The ID of the target subscription. #### Query Parameters - **api-version** (string) - The API version to use for this operation. Default is '2021-11-01-preview'. #### Request Body - **location** (string) - Required. The location of the lab. - **properties** (object) - The properties of the lab. - **additionalCapabilities** (object) - **installGpuDrivers** (string) - Flag to pre-install dedicated GPU drivers. Possible values are 'Enabled' and 'Disabled'. - **adminUser** (object) - **username** (string) - The username to use when signing in to lab VMs. - **password** (string) - The password for the user. Required for TemplateVM createOption. - **autoShutdownProfile** (object) - **disconnectDelay** (string) - The delay before disconnecting the user session. Format: 'HH:MM:SS'. - **idleDelay** (string) - The delay before shutting down the VM due to inactivity. Format: 'HH:MM:SS'. - **noConnectDelay** (string) - The delay before shutting down the VM if no user connects. Format: 'HH:MM:SS'. - **shutdownOnDisconnect** (string) - Whether to shut down the VM when the user disconnects. Possible values are 'Enabled' and 'Disabled'. - **shutdownOnIdle** (string) - Whether to shut down the VM when it is idle. Possible values are 'None', 'UserAbsence', and 'MaxConcurrentUsers'. - **shutdownWhenNotConnected** (string) - Whether to shut down the VM when the user is not connected. Possible values are 'Enabled' and 'Disabled'. - **connectionProfile** (object) - **clientRdpAccess** (string) - The access level for RDP clients. Possible values are 'Public' and 'Private'. - **clientSshAccess** (string) - The access level for SSH clients. Possible values are 'Public' and 'None'. - **webRdpAccess** (string) - The access level for RDP web clients. Possible values are 'Public' and 'None'. - **webSshAccess** (string) - The access level for SSH web clients. Possible values are 'Public' and 'None'. - **description** (string) - The description of the lab. - **imageReference** (object) - **offer** (string) - The image offer. Example: 'Windows-10'. - **publisher** (string) - The image publisher. Example: 'MicrosoftWindowsDesktop'. - **sku** (string) - The image SKU. Example: '20h2-pro'. - **version** (string) - The image version. Example: 'latest'. - **labPlanId** (string) - The ID of the lab plan. - **networkProfile** (object) - **loadBalancerId** (string) - The ID of the load balancer. - **publicIpId** (string) - The ID of the public IP address. - **subnetId** (string) - The ID of the subnet. - **nonAdminUser** (object) - **username** (string) - The username for non-admin users. - **password** (string) - The password for non-admin users. - **rosterProfile** (object) - **activeDirectoryGroupId** (string) - The ID of the Active Directory group. - **lmsInstance** (string) - The LMS instance. - **ltiClientId** (string) - The LTI client ID. - **ltiContextId** (string) - The LTI context ID. - **ltiRosterEndpoint** (string) - The LTI roster endpoint. - **securityProfile** (object) - **openAccess** (string) - Whether to enable open access for the lab. Possible values are 'Enabled' and 'Disabled'. - **sku** (object) - **capacity** (integer) - The SKU capacity. - **family** (string) - The SKU family. - **name** (string) - The SKU name. Example: 'Standard'. - **size** (string) - The SKU size. - **tier** (string) - The SKU tier. - **title** (string) - The title of the lab. - **virtualMachineProfile** (object) - **createOption** (string) - The option for creating the virtual machine. Possible values are 'TemplateVM' and 'Image'. - **usageQuota** (string) - The usage quota for the virtual machine. Format: 'HH:MM:SS'. - **useSharedPassword** (string) - Whether to use a shared password for lab VMs. Possible values are 'Enabled' and 'Disabled'. - **tags** (object) - A collection of tags to apply to the lab. ### Request Example ```json { "location": "westus2", "properties": { "additionalCapabilities": { "installGpuDrivers": "Disabled" }, "adminUser": { "username": "PlaceholderAccountName", "password": "PlaceholderPassword" }, "autoShutdownProfile": { "shutdownOnDisconnect": "Disabled", "shutdownOnIdle": "None", "shutdownWhenNotConnected": "Disabled" }, "connectionProfile": { "clientRdpAccess": "Public", "clientSshAccess": "None", "webRdpAccess": "None", "webSshAccess": "None" }, "description": "New lab description", "imageReference": { "offer": "Windows-10", "publisher": "MicrosoftWindowsDesktop", "sku": "20h2-pro", "version": "latest" }, "securityProfile": { "openAccess": "Disabled" }, "sku": { "capacity": 3, "name": "Standard" }, "title": "NewLabTitle", "virtualMachineProfile": { "createOption": "TemplateVM", "useSharedPassword": "Enabled" } } } ``` ### Response #### Success Response (201 Created) - **id** (string) - The resource ID of the lab. - **name** (string) - The name of the lab. - **type** (string) - The type of the resource. - **location** (string) - The location of the lab. - **properties** (object) - The properties of the lab (same as request body). #### Response Example ```json { "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.LabServices/labs/MyLab", "name": "MyLab", "type": "Microsoft.LabServices/labs", "location": "westus2", "properties": { "additionalCapabilities": { "installGpuDrivers": "Disabled" }, "adminUser": { "username": "PlaceholderAccountName" }, "autoShutdownProfile": { "disconnectDelay": "00:00:00", "idleDelay": "00:00:00", "noConnectDelay": "00:00:00", "shutdownOnDisconnect": "Disabled", "shutdownOnIdle": "None", "shutdownWhenNotConnected": "Disabled" }, "connectionProfile": { "clientRdpAccess": "Public", "clientSshAccess": "None", "webRdpAccess": "None", "webSshAccess": "None" }, "description": "New lab description", "imageReference": { "offer": "Windows-10", "publisher": "MicrosoftWindowsDesktop", "sku": "20h2-pro", "version": "latest" }, "provisioningState": "Succeeded", "securityProfile": { "openAccess": "Disabled" }, "sku": { "capacity": 3, "name": "Standard", "tier": "Standard" }, "title": "NewLabTitle", "virtualMachineProfile": { "createOption": "TemplateVM", "usageQuota": "00:00:00", "useSharedPassword": "Enabled" } } } ``` ``` -------------------------------- ### Get Applications with Filter Source: https://github.com/azure/azure-powershell/blob/main/src/Resources/MSGraph.Autorest/docs/Get-AzADApplication.md Retrieves applications that match a specific filter. This example filters for display names starting with 'some-name'. ```powershell Get-AzADApplication -Filter "startsWith(DisplayName,'some-name')" ``` -------------------------------- ### Get Azure Lighthouse registration definition by name Source: https://github.com/azure/azure-powershell/blob/main/src/ManagedServices/ManagedServices/help/Get-AzManagedServicesDefinition.md This example retrieves a specific registration definition by its unique name (GUID). ```APIDOC ## Get-AzManagedServicesDefinition -Name ### Description Gets the registration definition details for a specific registration definition by its name. ### Method GET ### Endpoint /subscriptions/{subscriptionId}/providers/Microsoft.ManagedServices/registrationDefinitions/{registrationDefinitionName} ### Parameters #### Path Parameters - **registrationDefinitionName** (string) - Required - The GUID of the registration definition. #### Query Parameters - **api-version** (string) - Required - The API version to use for this operation. ### Response #### Success Response (200) - **id** (string) - The resource ID of the registration definition. - **name** (string) - The name of the registration definition. - **type** (string) - The resource type. - **properties** (object) - Contains the properties of the registration definition. - **managedByTenantId** (string) - The tenant ID of the managed by tenant. - **authorization** (array) - The authorization list. - **eligibleAuthorization** (array) - The eligible authorization list. ### Request Example ```powershell Get-AzManagedServicesDefinition -Name "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ``` ### Response Example ```json { "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.ManagedServices/registrationDefinitions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "type": "Microsoft.ManagedServices/registrationDefinitions", "properties": { "managedByTenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "authorization": [ { "principalId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } ], "eligibleAuthorization": [ { "principalId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "principalTenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } ] } } ``` ``` -------------------------------- ### Start a batch of virtual machines immediately Source: https://github.com/azure/azure-powershell/blob/main/src/ComputeSchedule/ComputeSchedule/help/Invoke-AzComputeScheduleExecuteStart.md This example demonstrates how to start a batch of virtual machines immediately using the Invoke-AzComputeScheduleExecuteStart cmdlet. It specifies the location, a correlation ID for tracking, the resource IDs of the virtual machines to start, and optional parameters for retry count and window. ```APIDOC ## Invoke-AzComputeScheduleExecuteStart ### Description VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it. ### Method Invoke-AzComputeScheduleExecuteStart ### Parameters #### Path Parameters - **Location** (string) - Required - The location name. - **CorrelationId** (string) - Required - CorrelationId item. - **ResourceId** (string[]) - Required - The resource ids used for the request. #### Query Parameters - **SubscriptionId** (string) - Optional - The subscription ID. - **RetryCount** (int32) - Optional - Retry count for user request. - **RetryWindowInMinutes** (int32) - Optional - Retry window in minutes for user request. - **DefaultProfile** (PSObject) - Optional - The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ### Request Example ```powershell Invoke-AzComputeScheduleExecuteStart -Location "eastus2euap" -CorrelationId "d8cae7b7-190f-4574-a793-7bffa7a1b4a8" -ResourceId "/subscriptions/ed5d2ee7-ede1-44bd-97a2-369489bbefe4/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/pwshtest85223", "/subscriptions/ed5d2ee7-ede1-44bd-97a2-369489bbefe4/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/pwshtest85129" -SubscriptionId "ed5d2ee7-ede1-44bd-97a2-369489bbefe4" -RetryCount 2 -RetryWindowInMinutes 30 | Format-List ``` ### Response #### Success Response The response indicates the status of the start operation for each virtual machine, including details like operation ID, resource ID, retry policy, and the final state of the operation. ``` -------------------------------- ### Start Copy and Get Copy Status via Pipeline Source: https://github.com/azure/azure-powershell/blob/main/src/Storage/Storage.Management/help/Get-AzStorageFileCopyState.md This example demonstrates starting a file copy operation and then piping the resulting destination file object to Get-AzStorageFileCopyState to check its copy status. ```powershell $destfile = Start-AzStorageFileCopy -SrcShareName "contososhare" -SrcFilePath "contosofile" -DestShareName "contososhare2" -destfilepath "contosofile_copy" $destfile | Get-AzStorageFileCopyState ``` -------------------------------- ### Start Backfilling the Current Tenant Source: https://github.com/azure/azure-powershell/blob/main/src/Resources/Resources/help/Start-AzTenantBackfill.md This example demonstrates how to start the tenant backfill process using the Start-AzTenantBackfill cmdlet. No parameters are required for a basic execution. ```powershell Start-AzTenantBackfill ``` -------------------------------- ### Create a SQL virtual machine with default settings Source: https://github.com/azure/azure-powershell/blob/main/src/SqlVirtualMachine/SqlVirtualMachine.Autorest/examples/New-AzSqlVM.md This example demonstrates how to create a SQL virtual machine with the most basic configuration, using default settings for all optional parameters. ```APIDOC ## New-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Location 'eastus' ### Description Creates a SQL virtual machine with default settings. ### Parameters #### Path Parameters - **ResourceGroupName** (string) - Required - The name of the resource group. - **Name** (string) - Required - The name of the SQL virtual machine. - **Location** (string) - Required - The Azure region where the SQL virtual machine will be created. #### Query Parameters None #### Request Body None ### Request Example ```powershell New-AzSqlVM -ResourceGroupName 'ResourceGroup01' -Name 'sqlvm1' -Location 'eastus' ``` ### Response #### Success Response (200) - **Location** (string) - The location of the SQL virtual machine. - **Name** (string) - The name of the SQL virtual machine. - **ResourceGroupName** (string) - The resource group name of the SQL virtual machine. #### Response Example ```json { "Location": "eastus", "Name": "sqlvm1", "ResourceGroupName": "ResourceGroup01" } ``` ``` -------------------------------- ### Get Azure Storage container by name Source: https://github.com/azure/azure-powershell/blob/main/src/Storage/Storage.Management/help/Get-AzStorageContainer.md This example uses a wildcard character to return a list of all containers with a name that starts with container. ```powershell Get-AzStorageContainer -Name container* ``` -------------------------------- ### Start SAP Application Server Instance and VM Source: https://github.com/azure/azure-powershell/blob/main/src/Workloads/SapVirtualInstance.Autorest/docs/Start-AzWorkloadsSapApplicationInstance.md This example demonstrates how to start an SAP application server instance and its associated virtual machine. It requires the application instance name, resource group name, SAP Virtual Instance name, and the StartVM parameter. ```powershell Start-AzWorkloadsSapApplicationInstance -Name app0 -ResourceGroupName db0-vis-rg -SapVirtualInstanceName DB0 -StartVM ``` -------------------------------- ### Get predefined SSL policies by name pattern Source: https://github.com/azure/azure-powershell/blob/main/src/Network/Network/help/Get-AzApplicationGatewaySslPredefinedPolicy.md This example retrieves all predefined SSL policies whose names start with 'AppGwSslPolicy2017'. ```APIDOC ## Get-AzApplicationGatewaySslPredefinedPolicy ### Description Retrieves predefined SSL policies for an application gateway. ### Method GET ### Endpoint /subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewaySslPredefinedPolicies ### Parameters #### Query Parameters - **api-version** (string) - Required - The API version to use for this operation. - **name** (string) - Optional - Name of the ssl predefined policy. Accepts wildcard characters. ### Response #### Success Response (200) - **value** (array) - An array of PSApplicationGatewaySslPredefinedPolicy objects. ### Response Example ```json { "value": [ { "name": "AppGwSslPolicy20170401", "minProtocolVersion": "TLSv1_1", "cipherSuites": [ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", "TLS_RSA_WITH_AES_256_GCM_SHA384", "TLS_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_WITH_AES_256_CBC_SHA256", "TLS_RSA_WITH_AES_128_CBC_SHA256", "TLS_RSA_WITH_AES_256_CBC_SHA", "TLS_RSA_WITH_AES_128_CBC_SHA" ] }, { "name": "AppGwSslPolicy20170401S", "minProtocolVersion": "TLSv1_2", "cipherSuites": [ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", "TLS_RSA_WITH_AES_256_GCM_SHA384", "TLS_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_WITH_AES_256_CBC_SHA256", "TLS_RSA_WITH_AES_128_CBC_SHA256", "TLS_RSA_WITH_AES_256_CBC_SHA", "TLS_RSA_WITH_AES_128_CBC_SHA" ] } ] } ``` ``` -------------------------------- ### Get all files under a folder from a compute node Source: https://github.com/azure/azure-powershell/blob/main/src/Batch/Batch/help/Get-AzBatchNodeFile.md Retrieves all files recursively under a specified folder on a compute node. This example uses a filter to get files starting with 'startup' and specifies the -Recursive parameter. Requires a BatchAccountContext. ```powershell Get-AzBatchNodeFile -PoolId "Pool22" -ComputeNodeId "ComputeNode01" -Filter "startswith(name,'startup')" -Recursive -BatchContext $Context ``` -------------------------------- ### Start Backfilling the Current Tenant Source: https://github.com/azure/azure-powershell/blob/main/src/Resources/Resources/help/Start-AzTenantBackfill.md This example demonstrates how to start the tenant backfill process using the Start-AzTenantBackfill cmdlet. No parameters are required for a basic execution, as it operates on the current tenant context. ```APIDOC ## Start-AzTenantBackfill ### Description Starts backfilling subscriptions for the current Tenant. ### Method Start-AzTenantBackfill ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```powershell Start-AzTenantBackfill ``` ### Response #### Success Response (200) - **Name** (string) - The name of the backfill status. - **Type** (string) - The type of the backfill status. #### Response Example ```json { "Name": "Completed", "Type": "c7a87cda-9a66-4920-b0f8-869baa04efe0" } ``` ``` -------------------------------- ### Get VpnSites by Name Pattern Source: https://github.com/azure/azure-powershell/blob/main/src/Network/Network/help/Get-AzVpnSite.md This example retrieves all VpnSites whose names start with 'test'. It utilizes wildcard characters for pattern matching. ```powershell Get-AzVpnSite -Name test* ``` -------------------------------- ### Create virtual machine Source: https://github.com/azure/azure-powershell/blob/main/src/NetworkCloud/NetworkCloud/help/New-AzNetworkCloudVirtualMachine.md This example demonstrates how to create a virtual machine with various configurations, including network attachments, placement hints, and SSH public keys. ```APIDOC ## New-AzNetworkCloudVirtualMachine -CreateExpanded ### Description Creates a new virtual machine or updates the properties of an existing virtual machine. ### Method POST ### Endpoint /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName} ### Parameters #### Path Parameters - **Name** (String) - Required - The name of the virtual machine. - **ResourceGroupName** (String) - Required - The name of the resource group. - **SubscriptionId** (String) - Optional - The ID of the target subscription. #### Query Parameters - **IfMatch** (String) - Optional - The ETag of the resource to update. - **IfNoneMatch** (String) - Optional - The ETag of the resource to update. #### Request Body - **AdminUsername** (String) - Required - The username of the administrator. - **CloudServiceNetworkAttachmentAttachedNetworkId** (String) - Required - The ID of the attached network. - **CloudServiceNetworkAttachmentIPAllocationMethod** (String) - Required - The IP allocation method. - **CpuCore** (Int64) - Required - The number of CPU cores. - **ExtendedLocationName** (String) - Required - The name of the extended location. - **ExtendedLocationType** (String) - Required - The type of the extended location. - **Location** (String) - Required - The location of the resource. - **MemorySizeGb** (Int64) - Required - The size of the memory in GB. - **OSDiskSizeGb** (Int64) - Required - The size of the OS disk in GB. - **VMImage** (String) - Required - The VM image to use. - **BootMethod** (String) - Optional - The boot method of the virtual machine. - **CloudServiceNetworkAttachmentDefaultGateway** (String) - Optional - The default gateway for the cloud service network attachment. - **CloudServiceNetworkAttachmentIpv4Address** (String) - Optional - The IPv4 address for the cloud service network attachment. - **CloudServiceNetworkAttachmentIpv6Address** (String) - Optional - The IPv6 address for the cloud service network attachment. - **CloudServiceNetworkAttachmentName** (String) - Optional - The name of the cloud service network attachment. - **ConsoleExtendedLocationName** (String) - Optional - The name of the console extended location. - **ConsoleExtendedLocationType** (String) - Optional - The type of the console extended location. - **IsolateEmulatorThread** (String) - Optional - Specifies whether to isolate emulator threads. - **NetworkAttachment** (Array of INetworkAttachment) - Optional - The network attachments for the virtual machine. - **NetworkData** (String) - Optional - The network data for the virtual machine. - **OSDiskCreateOption** (String) - Optional - The creation option for the OS disk. - **OSDiskDeleteOption** (String) - Optional - The deletion option for the OS disk. - **PlacementHint** (Array of IVirtualMachinePlacementHint) - Optional - The placement hints for the virtual machine. - **SshPublicKey** (Array of ISshPublicKey) - Optional - The SSH public keys for the virtual machine. - **StorageProfileVolumeAttachment** (Array of String) - Optional - The storage profile volume attachments. - **Tag** (Hashtable) - Optional - The tags for the virtual machine. - **UserData** (String) - Optional - The user data for the virtual machine. - **VMDeviceModel** (String) - Optional - The device model of the virtual machine. - **VMImageRepositoryCredentialsPassword** (SecureString) - Optional - The password for the VM image repository credentials. - **VMImageRepositoryCredentialsRegistryUrl** (String) - Optional - The registry URL for the VM image repository credentials. - **VMImageRepositoryCredentialsUsername** (String) - Optional - The username for the VM image repository credentials. - **VirtioInterface** (String) - Optional - The virtio interface type. ### Request Example ```powershell $networkAttachment = @{ AttachedNetworkId = "attachedNetworkID" IpAllocationMethod = "Dynamic" } $hint = @{ HintType = "Affinity" SchedulingExecution = "schedulingExecution" Scope = "scope" ResourceId = "resourceId" } $sshPublicKey = @{ KeyData = "ssh-rsa aaaKyfsdx= fakekey@vm" } $securePassword = ConvertTo-SecureString "password" -asplaintext -force New-AzNetworkCloudVirtualMachine -Name vmName -ResourceGroupName resourceGroup -AdminUsername adminUsername -CloudServiceNetworkAttachmentAttachedNetworkId csnAttachedNetworkId -CloudServiceNetworkAttachmentIPAllocationMethod ipAllocationMethod -CpuCore cpuCore -ExtendedLocationName extendedLocationName -ExtendedLocationType "Custom" -Location location -SubscriptionId subscriptionId -MemorySizeGb memorySizeGb -OSDiskSizeGb osDiskSizeGb -VMImage vmImage -BootMethod bootMethod -CloudServiceNetworkAttachmentDefaultGateway defaultGateway -CloudServiceNetworkAttachmentName csnAttachmentName -IsolateEmulatorThread isolateEmulatorThread -NetworkAttachment $networkAttachment -NetworkData networkData -OSDiskCreateOption osDiskCreationOption -OSDiskDeleteOption osDiskDeleteOption -PlacementHint $hint -SshPublicKey $sshPublicKey -Tag @{tags = "tags"} -UserData userData -VirtioInterface virtioInterface -VMDeviceModel vmDeviceModel -VMImageRepositoryCredentialsUsername registryUsername -VMImageRepositoryCredentialsPassword $securePassword -VMImageRepositoryCredentialsRegistryUrl registryUrl ``` ### Response #### Success Response (200) - **Location** (String) - The location of the resource. - **Name** (String) - The name of the resource. - **SystemDataCreatedAt** (DateTime) - The timestamp of resource creation. - **SystemDataCreatedBy** (String) - The identity that created the resource. - **SystemDataCreatedByType** (String) - The type of identity that created the resource. - **SystemDataLastModifiedAt** (DateTime) - The timestamp of the last modification. - **SystemDataLastModifiedBy** (String) - The identity that last modified the resource. - **SystemDataLastModifiedByType** (String) - The type of identity that last modified the resource. #### Response Example ```json { "Location": "eastus", "Name": "default", "SystemDataCreatedAt": "2023-07-07T21:32:03Z", "SystemDataCreatedBy": "", "SystemDataCreatedByType": "User", "SystemDataLastModifiedAt": "2023-07-07T21:32:41Z", "SystemDataLastModifiedBy": "", "SystemDataLastModifiedByType": "Application" } ``` ``` -------------------------------- ### Create a Virtual Machine Source: https://github.com/azure/azure-powershell/blob/main/src/Compute/Compute/help/New-AzVM.md This example script shows how to create a virtual machine. The script will prompt for user credentials. It utilizes several other cmdlets for configuration. ```powershell New-AzVM -Name MyVm -Credential (Get-Credential) ```