This commit is contained in:
Adam Sandor 2022-07-12 17:16:59 -04:00
Родитель b5cff8a1eb 80b74774fd
Коммит 314ae199e9
174 изменённых файлов: 583 добавлений и 289 удалений

16
.devcontainer/Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,16 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/dotnet/.devcontainer/base.Dockerfile
# [Choice] .NET version: 6.0, 5.0, 3.1, 6.0-bullseye, 5.0-bullseye, 3.1-bullseye, 6.0-focal, 5.0-focal, 3.1-focal
ARG VARIANT="6.0-bullseye-slim"
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment this line to install global node packages.
RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g autorest" 2>&1

Просмотреть файл

@ -0,0 +1,59 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/dotnet
{
"name": "Azure PowerShell (C#, .NET, TypeScript)",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0
// Append -bullseye or -focal to pin to an OS version.
"VARIANT": "6.0",
// Options
"NODE_VERSION": "lts/*"
}
},
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],
// [Optional] To reuse of your local HTTPS dev cert:
//
// 1. Export it locally using this command:
// * Windows PowerShell:
// dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
// * macOS/Linux terminal:
// dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
//
// 2. Uncomment these 'remoteEnv' lines:
// "remoteEnv": {
// "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere",
// "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx",
// },
//
// 3. Do one of the following depending on your scenario:
// * When using GitHub Codespaces and/or Remote - Containers:
// 1. Start the container
// 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer
// 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https"
//
// * If only using Remote - Containers with a local container, uncomment this line instead:
// "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "dotnet restore",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"git": "os-provided",
"powershell": "latest"
}
}

Просмотреть файл

@ -19,10 +19,10 @@ d:\workspace\powershell\build.proj(511,5): error MSB3073: The command "d:\worksp
## Where to find StaticAnalysis reports
The StaticAnalysis reports could show up in two different places in the CI build:
- On the status page in Jenkins, under the Build Artifacts: the relevant files are `BreakingChangeIssues.csv`, `SignatureIssues.csv`, and/or `HelpIssues.csv`.
- On the status page in Jenkins, click Build Artifacts then navigate to artifacts. You will see `BreakingChangeIssues.csv`, `SignatureIssues.csv`, and/or `HelpIssues.csv`.
- On the status page in Jenkins, under the Build Artifacts: the relevant files are `BreakingChangeIssues.csv`, `SignatureIssues.csv`, `HelpIssues.csv` and/or `ExampleIssues.csv`.
- On the status page in Jenkins, click Build Artifacts then navigate to artifacts. You will see `BreakingChangeIssues.csv`, `SignatureIssues.csv`, `HelpIssues.csv` and/or `ExampleIssues.csv`.
Locally, the StaticAnalysis report will show up under Azure-PowerShell/artifacts. You will see `BreakingChangeIssues.csv`, `SignatureIssues.csv`, and/or `HelpIssues.csv`. You can generate these files by running
Locally, the StaticAnalysis report will show up under Azure-PowerShell/artifacts. You will see `BreakingChangeIssues.csv`, `SignatureIssues.csv`, `HelpIssues.csv` and/or `ExampleIssues.csv`. You can generate these files by running
```
msbuild build.proj
```
@ -55,7 +55,7 @@ Signature issues occur when your cmdlets do not follow PowerShell standards. Pl
Most help issues that cause StaticAnalysis to fail occur when help has not been added for a particular cmdlet. If you have not generated help for your new cmdlets, please follow the instructions [here](https://github.com/Azure/azure-powershell/blob/main/documentation/development-docs/help-generation.md). If this is not the issue, follow the steps listed under "Remediation" for each violation listed in HelpIssues.csv.
### Example Issues
Example issues occur when your changed markdown files in the `help` folder (_e.g.,_ `src/Accounts/Accounts/help`) violate PowerShell language best practices. Please follow the suggestion displayed in "Remediation" entry for each violation listed in `ExampleIssues.csv`. If you have an issue with severity 0 or 1 that has been approved by the Azure PowerShell team, you can suppress them following these steps:
Example issues occur when your changed markdown files in the `help` folder (_e.g.,_ `src/Accounts/Accounts/help`) violate PowerShell language best practices. Please follow the suggestion displayed in "Remediation" entry for each violation listed in `ExampleIssues.csv`. Issues with severity 0 or 1 must be addressed, while issues with severity 2 are advisory. To better standardize the writing of documents, please also check the warning issues with severity 2 in log or download the `ExampleIssues.csv` file. If you have an issue with severity 0 or 1 that has been approved by the Azure PowerShell team, you can suppress them following these steps:
- Download the `ExampleIssues.csv` file from the CI pipeline artifacts
- Open the file using a text editor (such as VS Code) and copy each of the errors you'd like to suppress
@ -63,4 +63,4 @@ Example issues occur when your changed markdown files in the `help` folder (_e.g
- Copy each of the errors you would like to suppress directly from the ExampleIssues.csv file output in the CI pipeline artifacts
- Push the changes to the .csv file and ensure the errors no longer show up in the `ExampleIssues.csv` file output from the CI pipeline artifacts.
To better standardize the writing of documents, please also check the warning issues with severity 2 by downloading the `ExampleIssues.csv` file.
If you have unexpected errors, please check whether you have splitted outputs from codes. If outputs cannot be separated from codes, then please add the tag `<!-- Skip: Output cannot be splitted from code -->` to the next line of the example title and in front of the code block.

Просмотреть файл

@ -58,6 +58,7 @@ The built-in environments AzureCloud and AzureChinaCloud target existing public
## EXAMPLES
### Example 1: Creating and modifying a new environment
<!-- Skip: Output cannot be splitted from code -->
```powershell
Add-AzEnvironment -Name TestEnvironment `
-ActiveDirectoryEndpoint TestADEndpoint `

Просмотреть файл

@ -23,6 +23,7 @@ The Remove-AzEnvironment cmdlet removes endpoints and metadata information for c
## EXAMPLES
### Example 1: Creating and removing a test environment
<!-- Skip: Output cannot be splitted from code -->
```powershell
Add-AzEnvironment -Name TestEnvironment `
-ActiveDirectoryEndpoint TestADEndpoint `

Просмотреть файл

@ -51,6 +51,7 @@ The Set-AzEnvironment cmdlet sets endpoints and metadata for connecting to an in
## EXAMPLES
### Example 1: Creating and modifying a new environment
<!-- Skip: Output cannot be splitted from code -->
```powershell
Add-AzEnvironment -Name TestEnvironment `
-ActiveDirectoryEndpoint TestADEndpoint `

Просмотреть файл

@ -30,6 +30,7 @@ Gets the Network status of their Api Management service
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzApiManagementNetworkStatus -ResourceGroupName powershelltest -Name powershellsdkservice

Просмотреть файл

@ -38,7 +38,6 @@ Restore-AzApiManagement -ResourceGroupName "ContosoGroup" -Name "RestoredContoso
This command restores an API Management service from Azure storage blob.
### Example 2: Restore an API Management service using Managed Identity Credentials
```powershell
PS D:> $storageContext=New-AzStorageContext -StorageAccountName apimbackupmsi
PS D:> $resourceGroupName="ContosoGroup02";
@ -46,10 +45,10 @@ PS D:> $apiManagementName="contosoapi";
PS D:> $containerName="apimbackupcontainer";
PS D:> $backupName="test-sdk-backup-1";
PS D:> $msiClientId="a6270d0c-7d86-478b-8cbe-dc9047ba54f7"
PS D:> Restore-AzApiManagement -ResourceGroupName $resourceGroupName -Name $apiManagementName -StorageContext $storageContext -SourceContainerName $containerName -SourceBlobName $backupName -AccessType "UserAssignedManagedIdentity" -IdentityClientId $msiClientId -PassThru
```
```output
PublicIPAddresses : {52.143.79.150}
PrivateIPAddresses :
Id : /subscriptions/4f5285a3-9fd7-40ad-91b1-d8fc3823983d/resourceGroups/ContosoGroup02/providers/Microsoft.ApiManagement/service/contosoapi

Просмотреть файл

@ -72,6 +72,7 @@ Set-AzApiManagement -InputObject $apim -PassThru
```
### Example 5: Add Managed Certificate to an APIM Service
<!-- Skip: Output cannot be splitted from code -->
```powershell
$gateway=New-AzApiManagementCustomHostnameConfiguration -Hostname freecertCanary.contoso.api -HostnameType Proxy -ManagedCertificate

Просмотреть файл

@ -45,6 +45,7 @@ The cmdlet **Set-AzApiManagementDiagnostic** updates the diagnostics which is co
## EXAMPLES
### Example 1: Modify a diagnostic at the Global scope
<!-- Skip: Output cannot be splitted from code -->
```powershell
$context =New-AzApiManagementContext -ResourceGroupName Api-Default-WestUS -ServiceName contoso
$diagnostic=Get-AzApiManagementDiagnostic -Context $context -DiagnosticId "applicationinsights"

Просмотреть файл

@ -32,6 +32,7 @@ The **Get-AzAutomationDscNodeConfigurationDeployment** cmdlet deploys an APS Des
## EXAMPLES
### Example 1: Get a node configuration deployment
<!-- Skip: Output cannot be splitted from code -->
```powershell
$deployment = Get-AzAutomationDscNodeConfigurationDeployment `
-JobId 35b14eb4-52b7-4a1d-ad62-8e9f84adc657 `

Просмотреть файл

@ -51,6 +51,7 @@ RunbookName : Deploy-NodeConfigurationToAutomationDscNodesV1
```
### Example 2: Get a deployment schedule
<!-- Skip: Output cannot be splitted from code -->
```powershell
$js = Get-AzAutomationDscNodeConfigurationDeploymentSchedule `
-AutomationAccountName "Contoso01" `

Просмотреть файл

@ -31,6 +31,7 @@ $Context = Get-AzBatchAccountKey -AccountName myaccount
This command gets the account details and stores it in a `$Context` object for use later.
### Example 2: Get batch account keys and display them
<!-- Skip: Output cannot be splitted from code -->
```powershell
$Context = Get-AzBatchAccountKey -AccountName myaccount
$Context.PrimaryAccountKey

Просмотреть файл

@ -57,6 +57,7 @@ contosopool2 Idle: 1, Rebooting: 1, Total: 2
List node counts per node state for pools under current batch account context.
### Example 2
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzBatchPoolNodeCount -BatchContext $batchContext -PoolId "contosopool1"

Просмотреть файл

@ -23,6 +23,7 @@ Gets the status of a cloud service.
## EXAMPLES
### Example 1: Get cloud service instance view
<!-- Skip: Output cannot be splitted from code -->
```powershell
$cloudServiceInstanceView = Get-AzCloudServiceInstanceView -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS"

Просмотреть файл

@ -134,7 +134,7 @@ $networkProfile = @{loadBalancerConfiguration = $loadBalancerConfig}
# Read Configuration File
$cscfgFile = "<Path to cscfg configuration file>"
= Get-Content $cscfgFile | Out-String
$cscfgContent = Get-Content $cscfgFile | Out-String
# Create cloud service
$cloudService = New-AzCloudService `

Просмотреть файл

@ -1,10 +1,10 @@
### Example 1: Simple Example
```powershell
PS C:\> Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName 'firstruncommand'
PS C:\> Set-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -Location 'eastus' -RunCommandName 'firstruncommand'
Location Name Type
-------- ---- ----
eastus firstruncommand2 Microsoft.Compute/virtualMachines/runCommands
eastus firstruncommand Microsoft.Compute/virtualMachines/runCommands
```
The Set-AzVMRunCommand cmdlet updates properties for existing run command or adds a new run command to a virtual machine.

Просмотреть файл

@ -46,6 +46,7 @@ Invoke-AzVMRunCommand -ResourceGroupName 'rgname' -VMName 'vmname' -CommandId 'R
Invoke a run command 'RunPowerShellScript' with overriding the script 'sample.ps1' on a Windows VM named 'vmname' in resource group 'rgname'. Var1 and var2 are defined as parameters in the sample.ps1. Parameter value can be string type only and script is responsible for converting them to other types if needed.
### Example 2: Invoke a command on Linux
<!-- Skip: Output cannot be splitted from code -->
```powershell
export param1=var1 param2=var2
set -- var1 var2 var3

Просмотреть файл

@ -51,6 +51,7 @@ set the disk encryption key and key encryption key settings for the disk object.
takes the disk object and creates a disk with name 'Disk01' in resource group 'ResourceGroup01'.
### Example 2
<!-- Skip: Output cannot be splitted from code -->
```powershell
$diskconfig = New-AzDiskConfig -Location 'Central US' -DiskSizeGB 1023 -SkuName Standard_LRS -OsType Windows -CreateOption Upload -DiskIOPSReadWrite 500 -DiskMBpsReadWrite 8;
New-AzDisk -ResourceGroupName 'ResourceGroup01' -DiskName 'Disk01' -Disk $diskconfig;

Просмотреть файл

@ -30,7 +30,7 @@ $VM = Set-AzVmSecurityProfile -VM $VM -SecurityType "TrustedLaunch"
The first command gets the virtual machine named ContosoVM07 by using **Get-AzVm**.
The command stores it in the $VM variable.
The second command sets the SecurityType enum to "TrustedLaunch"
The second command sets the SecurityType enum to "TrustedLaunch". Trusted launch requires the creation of new virtual machines. You can't enable trusted launch on existing virtual machines that were initially created without it.
## PARAMETERS

Просмотреть файл

@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* General availability of `Az.ConfidentialLedger`
## Version 0.1.1
* Updated API version to 2022-05-13

Просмотреть файл

@ -46,6 +46,7 @@ To update other fields use the CreateOrUpdate method.
## EXAMPLES
### Example 1: Update the tags of a private link scope
<!-- Skip: Output cannot be splitted from code -->
```powershell
$scope = Update-AzConnectedPrivateLinkScopeTag -ResourceGroupName $resourceGroupName -ScopeName $scopeName -Tag $tags2

Просмотреть файл

@ -23,6 +23,7 @@ List Azure Cosmos DB locations with their location properties. It includes Locat
## EXAMPLES
### Example 1: Get Azure Cosmos DB Account Location Properties for Given Location
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzCosmosDBLocation -Location "Central US"
@ -49,6 +50,7 @@ Get-AzCosmosDBLocation -Location "Central US" | ConvertTo-Json
```
### Example 2: List Azure Cosmos DB Account Locations and their properties
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzCosmosDBLocation

Просмотреть файл

@ -23,6 +23,7 @@ This method gets the unencrypted secrets related to the job.
## EXAMPLES
### Example 1: Get databoxHeavy job credential
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzDataBoxJobCredential -Name "DtbxPowershell" -ResourceGroupName "resourceGroupName"

Просмотреть файл

@ -28,6 +28,7 @@ Existing job cannot be updated with this API and should instead be updated with
## EXAMPLES
### Example 1: Create a databox import job
<!-- Skip: Output cannot be splitted from code -->
```powershell
$dataAccount = New-AzDataBoxStorageAccountDetailsObject -DataAccountType "StorageAccount" -StorageAccountId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageAccountName"
$contactDetail = New-AzDataBoxContactDetailsObject -ContactName "random" -EmailList @("emailId") -Phone "1234567891"

Просмотреть файл

@ -25,6 +25,7 @@ Updates the properties of an existing job.
## EXAMPLES
### Example 1: Update databox job encryption from microsoft managed to customer managed with user assigned identities
<!-- Skip: Output cannot be splitted from code -->
```powershell
$keyEncryptionDetails = New-AzDataBoxKeyEncryptionKeyObject -KekType "CustomerManaged" -IdentityProperty @{Type = "UserAssigned"; UserAssignedResourceId = "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName"} -KekUrl "keyIdentifier" -KekVaultResourceId "/subscriptions/SubscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/keyVaultName"
@ -55,6 +56,7 @@ Powershell10 WestUS DeviceOrdered ImportToAzure DataBox UserAssigned NonSchedu
Update databox job encryption from microsoft managed to customer managed with user assigned identities.
### Example 2: Update databox job encryption from microsoft managed to customer managed with system identities in 2 updates
<!-- Skip: Output cannot be splitted from code -->
```powershell
$databoxUpdate = Update-AzDataBoxJob -Name "pwshTestSAssigned" -ResourceGroupName "resourceGroupName" -ContactDetail $contactDetail -ShippingAddress $ShippingDetails -IdentityType "SystemAssigned"

Просмотреть файл

@ -48,6 +48,7 @@ The PowerShell command sequence for data flow debug workflow should be:
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
$result = Invoke-AzDataFactoryV2DataFlowDebugSessionCommand -ResourceGroupName adf -DataFactoryName WiKiADF -Command executePreviewQuery -SessionId fd76cd0d-8b37-4dc0-a370-3f9d43ac686d -StreamName source1 -RowLimit 100 -AsJob
$result

Просмотреть файл

@ -43,6 +43,7 @@ The PowerShell command sequence for data flow debug workflow should be:
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
$job = Start-AzDataFactoryV2DataFlowDebugSession -ResourceGroupName adf -DataFactoryName jikma0601sea -AsJob
$job

Просмотреть файл

@ -26,6 +26,7 @@ the database level settings for migration.
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
$x = New-AzDataMigrationMongoDbCollectionSetting -Name myCollection -TargetRequestUnit 1000 -CanDelete -ShardKey "_id:-1,age:1,name"
$x

Просмотреть файл

@ -49,6 +49,7 @@ Use cmdlet "New-AzFrontDoorHeaderActionObject" to create PSHeaderObjects to pass
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
$headerActions = New-AzFrontDoorHeaderActionObject -HeaderActionType "Append" -HeaderName "X-Content-Type-Options" -Value "nosniff"
$headerActions
@ -69,6 +70,7 @@ RequestHeaderActions ResponseHeaderActions RouteConfigurationOverride
Create a rules engine action that append response header value and show how to view the properties of the rules engine action created.
### Example 2
<!-- Skip: Output cannot be splitted from code -->
```powershell
$rulesEngineAction = New-AzFrontDoorRulesEngineActionObject -RequestHeaderAction $headerActions -ForwardingProtocol HttpsOnly -BackendPoolName mybackendpool -ResourceGroupName Jessicl-Test-RG -FrontDoorName jessicl-test-myappfrontend -QueryParameterStripDirective StripNone -DynamicCompression Disabled -EnableCaching $true
$rulesEngineAction
@ -99,6 +101,7 @@ EnableCaching : True
Create a rules engine action that forwards the requests to a speicific backend pool and show how to view the properties of the rules engine action created.
### Example 3
<!-- Skip: Output cannot be splitted from code -->
```powershell
$rulesEngineAction = New-AzFrontDoorRulesEngineActionObject -RedirectType Moved -RedirectProtocol MatchRequest -CustomHost www.contoso.com
$rulesEngineAction

Просмотреть файл

@ -27,6 +27,7 @@ Use cmdlet "New-AzFrontDoorRulesEngineMatchConditionObject" to create PSRulesEng
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
New-AzFrontDoorRulesEngineRuleObject -Name rules1 -Priority 0 -Action $rulesEngineAction -MatchProcessingBehavior Stop -MatchCondition $rulesEngineMatchCondition

Просмотреть файл

@ -37,6 +37,7 @@ Update a Rules Engine.
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzFrontDoorRulesEngine -ResourceGroupName $resourceGroupName -FrontDoorName $frontDoorName -Name myRulesEngine

Просмотреть файл

@ -61,7 +61,6 @@ namespace Microsoft.Azure.Commands.HPCCache.Test.Fixtures
{
using (this.Context = new HpcCacheTestContext(this.GetType().Name))
{
this.Context = new HpcCacheTestContext(this.GetType().Name);
try
{
StorageCacheManagementClient storagecacheMgmtClient = this.Context.GetClient<StorageCacheManagementClient>();

Просмотреть файл

@ -48,7 +48,6 @@
this.fixture = fixture;
using (this.Context = new HpcCacheTestContext(this.GetType().Name))
{
this.Context = new HpcCacheTestContext(this.GetType().Name);
this.StorageTarget = this.AddClfsStorageTarget(this.Context);
Match clfsTargetMatch = ClfsTargetRegex.Match(this.StorageTarget.Clfs.Target);
var storageAccountName = clfsTargetMatch.Groups["StorageAccountName"].Value;

Просмотреть файл

@ -25,6 +25,7 @@ The **Add-AzKeyVaultCertificate** cmdlet starts the process of enrolling for a c
## EXAMPLES
### Example 1: Add a certificate
<!-- Skip: Output cannot be splitted from code -->
```powershell
$Policy = New-AzKeyVaultCertificatePolicy -SecretContentType "application/x-pkcs12" -SubjectName "CN=contoso.com" -IssuerName "Self" -ValidityInMonths 6 -ReuseKeyOnRenewal
Add-AzKeyVaultCertificate -VaultName "ContosoKV01" -Name "TestCert01" -CertificatePolicy $Policy

Просмотреть файл

@ -55,6 +55,7 @@ Managed HSM Backup 1 permission(s)
The example lists all the roles at "/keys" scope.
### Example 2
<!-- Skip: Output cannot be splitted from code -->
```powershell
$backupRole = Get-AzKeyVaultRoleDefinition -HsmName myHsm -RoleDefinitionName "Managed HSM Backup User"

Просмотреть файл

@ -164,6 +164,7 @@ The cmdlet may call below Microsoft Graph API according to input parameters:
## EXAMPLES
### Example 1: Grant permissions to a user for a key vault and modify the permissions
<!-- Skip: Output cannot be splitted from code -->
```powershell
Set-AzKeyVaultAccessPolicy -VaultName 'Contoso03Vault' -UserPrincipalName 'PattiFuller@contoso.com' -PermissionsToKeys create,import,delete,list -PermissionsToSecrets set,delete -PassThru

Просмотреть файл

@ -27,6 +27,7 @@ Please do provide the "-AgreementType" parameter to specify whether X12 or Edifa
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzIntegrationAccountReceivedIcn -AgreementType "X12" -ResourceGroupName "groupName" -Name "accountName" -AgreementName "X12AgreementName" -ControlNumberValue "000000641"
@ -53,6 +54,7 @@ Removes the received X12 interchange control number.
Confirms the received X12 interchange control number was removed by attempting to get it again.
### Example 2
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzIntegrationAccountReceivedIcn -AgreementType "Edifact" -ResourceGroupName "groupName" -Name "accountName" -AgreementName "EdifactAgreementName" -ControlNumberValue "000000641"

Просмотреть файл

@ -37,6 +37,7 @@ for
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
$metric = New-AzDiagnosticDetailSetting -Metric -RetentionInDays 1 -RetentionEnabled -Category AllMetrics
$log = New-AzDiagnosticDetailSetting -Log -RetentionInDays 1 -RetentionEnabled -Category Audit -Enabled

Просмотреть файл

@ -19,6 +19,7 @@
--->
## Upcoming Release
* Onboarded Device Update for IoT Hub to Private Link Common Cmdlets
## Version 4.18.0
* Added support for CustomV2 ssl policies for Application Gateway.

Просмотреть файл

@ -35,6 +35,7 @@ namespace Microsoft.Azure.Commands.Network.PrivateLinkService.PrivateLinkService
RegisterConfiguration("Microsoft.DesktopVirtualization/workspaces", "2021-09-03-preview", true, false);
RegisterConfiguration("Microsoft.Devices/IotHubs", "2020-03-01", true, true);
RegisterConfiguration("Microsoft.Devices/ProvisioningServices", "2020-03-01", true, true);
RegisterConfiguration("Microsoft.DeviceUpdate/accounts", "2020-03-01-preview", true, true);
RegisterConfiguration("Microsoft.DigitalTwins/digitalTwinsInstances", "2020-12-01", true, true);
RegisterConfiguration("Microsoft.DocumentDB/databaseAccounts", "2019-08-01-preview", true, true);
RegisterConfiguration("Microsoft.EventGrid/topics", "2020-04-01-preview", true, true);

Просмотреть файл

@ -34,6 +34,7 @@ Gets a Nat Gateway resource in a resource group by name OR NatGateway Id OR all
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzNatGateway -ResourceGroupName "natgateway_test"

Просмотреть файл

@ -25,6 +25,7 @@ For example, even if you specify `-Location eastus2` you will get the list of se
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
$serviceTags = Get-AzNetworkServiceTag -Location eastus2
$serviceTags
@ -73,6 +74,7 @@ Change Number : 2
The command gets the list of service tag information resources and stores it in variable `serviceTags`.
### Example 2: Get all address prefixes for AzureSQL
<!-- Skip: Output cannot be splitted from code -->
```powershell
$serviceTags = Get-AzNetworkServiceTag -Location eastus2
$sql = $serviceTags.Values | Where-Object { $_.Name -eq "Sql" }
@ -98,6 +100,7 @@ The first command gets the list of service tag information resources and stores
The second command filters the list to select information resource for Sql.
### Example 3: Get Storage's service tag information resource for West US 2
<!-- Skip: Output cannot be splitted from code -->
```powershell
$serviceTags = Get-AzNetworkServiceTag -Location eastus2
$serviceTags.Values | Where-Object { $_.Name -eq "Storage.WestUS2" }

Просмотреть файл

@ -39,6 +39,7 @@ Please note that the SAS url provided should be one for the **blob** (file) that
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
$blobSasUrl = New-AzStorageBlobSASToken -Container contp2stesting -Blob emptyfile.txt -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri
$blobSasUrl

Просмотреть файл

@ -23,6 +23,7 @@ New-AzApplicationGatewayRewriteRuleCondition -Variable <String> [-Pattern <Strin
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
$condition = New-AzApplicationGatewayRewriteRuleCondition -Variable "var_request_uri" -Pattern "http" -IgnoreCase
$condition

Просмотреть файл

@ -63,6 +63,7 @@ The above command will create a VHubRoute object with nextHop as the specified h
### Example 3
<!-- Skip: Output cannot be splitted from code -->
```powershell
$hub = Get-AzVirtualHub -ResourceGroupName "rgname" -Name "virtual-hub-name"
$hubVnetConn = Get-AzVirtualHubVnetConnection -ParentObject $hub -Name "connection-name"

Просмотреть файл

@ -114,6 +114,7 @@ New-AzVirtualHubVnetConnection -EnableInternetSecurity -Name 'testvnetconnection
### Example 3
<!-- Skip: Output cannot be splitted from code -->
```powershell
$rgName = "testRg"
$virtualHubName = "testHub"

Просмотреть файл

@ -30,6 +30,7 @@ Remove-AzDdosProtectionPlan -ResourceGroupName ResourceGroupName -Name DdosProte
In this case, we remove a DDoS protection plan as specified.
### Example 2: Remove a DDoS protection plan associated with a virtual network
<!-- Skip: Output cannot be splitted from code -->
```powershell
$vnet = Get-AzVirtualNetwork -Name VnetName -ResourceGroupName ResourceGroupName
$vnet.DdosProtectionPlan = $null

Просмотреть файл

@ -63,6 +63,7 @@ Scale Units : 10
Updates BastionHost resource with Basic Sku and 2 Scale Units to Standard Sku and 10 Scale Units
### Example 2
<!-- Skip: Output cannot be splitted from code -->
```powershell
$bastionObj = Get-AzBastion -ResourceGroupName "MyRg" -Name "MyBastion"
$bastionObj

Просмотреть файл

@ -24,6 +24,7 @@ The **Set-AzPrivateDnsZoneGroup** cmdlet updates DNS zone group.
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzPrivateDnsZoneGroup -ResourceGroupName rg -PrivateEndpointName my-pr-endpoint -name dnsgroup1

Просмотреть файл

@ -76,6 +76,7 @@ The command passes that table to the Add-AzRouteConfig cmdlet by using the pipel
**Add-AzRouteConfig** adds the route named Route07, and then passes the result to the current cmdlet, which updates the table to reflect your changes.
### Example 2: Modify route table
<!-- Skip: Output cannot be splitted from code -->
```powershell
$rt = Get-AzRouteTable -ResourceGroupName "rgName" -Name "rtName"

Просмотреть файл

@ -130,6 +130,7 @@ The first command gets a virtual network gateway named Gateway01 that belongs to
The second command updates the virtual network gateway Gateway01 with the tags @{ testtagKey="SomeTagKey"; testtagValue="SomeKeyValue" }.
### Example 4: Add/Update AAD authentication configuration for VpnClient of an existing virtual network gateway
<!-- Skip: Output cannot be splitted from code -->
```powershell
$Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -AadTenantUri "https://login.microsoftonline.com/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4" -AadIssuerUri "https://sts.windows.net/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4/" -AadAudienceId "a21fce82-76af-45e6-8583-a08cb3b956f9"

Просмотреть файл

@ -57,6 +57,7 @@ The New-AzPrivateDnsRecordConfig cmdlet creates a local PSPrivateDnsRecord objec
## EXAMPLES
### Example 1: Create a RecordSet of type A
<!-- Skip: Output cannot be splitted from code -->
```powershell
$Records = @()
$Records += New-AzPrivateDnsRecordConfig -IPv4Address 1.2.3.4

Просмотреть файл

@ -39,6 +39,7 @@ The New-AzPrivateDnsRecordSet cmdlet creates a new Private Domain Name System (D
## EXAMPLES
### Example 1: Create a RecordSet of type A
<!-- Skip: Output cannot be splitted from code -->
```powershell
$Records = @()
$Records += New-AzPrivateDnsRecordConfig -IPv4Address 1.2.3.4

Просмотреть файл

@ -23,6 +23,7 @@ The Disable-AzRecoveryServicesBackupRPMountScript cmdlet dismounts the files of
## EXAMPLES
### Example 1: Dismount a recovery point
<!-- Skip: Output cannot be splitted from code -->
```powershell
$namedContainer = Get-AzRecoveryServicesBackupContainer -ContainerType "AzureVM" -Status "Registered" -FriendlyName "V2VM"
$backupitem = Get-AzRecoveryServicesBackupItem -Container $namedContainer -WorkloadType "AzureVM"

Просмотреть файл

@ -28,6 +28,7 @@ To aid the user to prerequisite the operation the client can call operation with
## EXAMPLES
### Example 1: Validate the dependecies before prepare of the resources. Get the required dependent resources that also need to be prepared.
<!-- Skip: Output cannot be splitted from code -->
```powershell
$resp = Invoke-AzResourceMoverPrepare -ResourceGroupName "RG-MoveCollection-demoRMS" -MoveCollectionName "PS-centralus-westcentralus-demoRMS" -MoveResource $('psdemovm') -ValidateOnly

Просмотреть файл

@ -20,7 +20,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class DenyAssignmentTests : ResourceTestRunner
public class DenyAssignmentTests : ResourcesTestRunner
{
public XunitTracingInterceptor _logger;

Просмотреть файл

@ -18,7 +18,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class DeploymentScriptsTests : ResourceTestRunner
public class DeploymentScriptsTests : ResourcesTestRunner
{
public DeploymentScriptsTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -19,7 +19,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class DeploymentTests : ResourceTestRunner
public class DeploymentTests : ResourcesTestRunner
{
public DeploymentTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -18,7 +18,7 @@ namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
using Xunit;
using Xunit.Abstractions;
public class DeploymentWhatIfTests : ResourceTestRunner
public class DeploymentWhatIfTests : ResourcesTestRunner
{
public DeploymentWhatIfTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -18,7 +18,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class InvokeResourceActionTests : ResourceTestRunner
public class InvokeResourceActionTests : ResourcesTestRunner
{
public InvokeResourceActionTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -19,7 +19,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class LocationTests: ResourceTestRunner
public class LocationTests: ResourcesTestRunner
{
public LocationTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -20,7 +20,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class ManagedApplicationDefinitionTests : ResourceTestRunner
public class ManagedApplicationDefinitionTests : ResourcesTestRunner
{
public ManagedApplicationDefinitionTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -20,7 +20,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class ManagedApplicationTests : ResourceTestRunner
public class ManagedApplicationTests : ResourcesTestRunner
{
public ManagedApplicationTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -18,7 +18,7 @@ using Xunit;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class ManagementGroupsTests : ResourceTestRunner
public class ManagementGroupsTests : ResourcesTestRunner
{
public ManagementGroupsTests(Xunit.Abstractions.ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -18,7 +18,7 @@ namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
using WindowsAzure.Commands.ScenarioTest;
using Xunit;
using Xunit.Abstractions;
public class MoveResourceTest : ResourceTestRunner
public class MoveResourceTest : ResourcesTestRunner
{
public MoveResourceTest(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -18,7 +18,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class PolicyAliasNamespaceMatchTest : ResourceTestRunner
public class PolicyAliasNamespaceMatchTest : ResourcesTestRunner
{
public PolicyAliasNamespaceMatchTest(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -18,7 +18,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class PolicyTests : ResourceTestRunner
public class PolicyTests : ResourcesTestRunner
{
public PolicyTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -19,7 +19,7 @@ namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
using Xunit;
using Xunit.Abstractions;
public class ProviderFeatureTests : ResourceTestRunner
public class ProviderFeatureTests : ResourcesTestRunner
{
public ProviderFeatureTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -19,7 +19,7 @@ namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
using Xunit;
using Xunit.Abstractions;
public class ProviderTests : ResourceTestRunner
public class ProviderTests : ResourcesTestRunner
{
public ProviderTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -19,7 +19,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class ResourceGroupTests : ResourceTestRunner
public class ResourceGroupTests : ResourcesTestRunner
{
public ResourceGroupTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -20,7 +20,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class ResourceLockTests : ResourceTestRunner
public class ResourceLockTests : ResourcesTestRunner
{
public ResourceLockTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -17,7 +17,7 @@ using Xunit;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class ResourceManagementPrivateLinksTests : ResourceTestRunner
public class ResourceManagementPrivateLinksTests : ResourcesTestRunner
{
public ResourceManagementPrivateLinksTests(Xunit.Abstractions.ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -20,7 +20,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class ResourceTests : ResourceTestRunner
public class ResourceTests : ResourcesTestRunner
{
public ResourceTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -27,11 +27,11 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class ResourceTestRunner
public class ResourcesTestRunner
{
protected readonly ITestRunner TestRunner;
protected ResourceTestRunner(ITestOutputHelper output)
protected ResourcesTestRunner(ITestOutputHelper output)
{
TestRunner = TestManager.CreateInstance(output)
.WithNewPsScriptFilename($"{GetType().Name}.ps1")

Просмотреть файл

@ -21,7 +21,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class RoleAssignmentTests : ResourceTestRunner
public class RoleAssignmentTests : ResourcesTestRunner
{
public XunitTracingInterceptor _logger;

Просмотреть файл

@ -19,7 +19,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class RoleDefinitionTests : ResourceTestRunner
public class RoleDefinitionTests : ResourcesTestRunner
{
public RoleDefinitionTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -18,7 +18,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class TagTests : ResourceTestRunner
public class TagTests : ResourcesTestRunner
{
public TagTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -18,7 +18,7 @@ using Xunit.Abstractions;
namespace Microsoft.Azure.Commands.Resources.Test.ScenarioTests
{
public class TemplateSpecTests : ResourceTestRunner
public class TemplateSpecTests : ResourcesTestRunner
{
public TemplateSpecTests(ITestOutputHelper output) : base(output)
{

Просмотреть файл

@ -66,6 +66,7 @@ ParentDisplayName : TestGroupParent
```
### Example 3: Get specific Management Group and first level of hierarchy
<!-- Skip: Output cannot be splitted from code -->
```powershell
$reponse = Get-AzManagementGroup -GroupName TestGroupParent -Expand
$response
@ -94,6 +95,7 @@ Children :
With the `Expand` flag, one can navigate through the `Children` array and get details for each child. For example, `Children[0]` will give details for the group with display name `TestGroup1DisplayName`.
### Example 4: Get specific Management Group and all levels of hierarchy
<!-- Skip: Output cannot be splitted from code -->
```powershell
$response = Get-AzManagementGroup -GroupName TestGroupParent -Expand -Recurse
$response

Просмотреть файл

@ -131,6 +131,7 @@ New-AzRoleAssignment -ResourceGroupName rg1 -SignInName allen.young@live.com -Ro
Grant Reader role access to a user at a resource group scope with the Role Assignment being available for delegation
### Example 2
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzADGroup -SearchString "Christine Koch Team"

Просмотреть файл

@ -82,6 +82,7 @@ Values:
This command creates a predefined tag named Department with a value of Finance.
### Example 3: Add a value to a predefined tag
<!-- Skip: Output cannot be splitted from code -->
```powershell
New-AzTag -Name "Department" -Value "Finance"
@ -105,6 +106,7 @@ These commands create a predefined tag named Department with two values.
If the tag name exists, **New-AzTag** adds the value to the existing tag instead of creating a new one.
### Example 4: Use a predefined tag
<!-- Skip: Output cannot be splitted from code -->
```powershell
New-AzTag -Name "CostCenter" -Value "0001"

Просмотреть файл

@ -133,6 +133,7 @@ The command stores that object in the $PolicyAssignment variable.
The final command updates the parameter values on the policy assignment named PolicyAssignment.
### Example 5: Update policy assignment parameters with policy parameter file
<!-- Skip: Output cannot be splitted from code -->
Create a file called _AllowedLocations.json_ in the local working directory with the following content.
```

Просмотреть файл

@ -40,6 +40,7 @@ If the cmdlet finds more than one running deployment, the command fails.
## EXAMPLES
### Example 1: Starting and stopping a resource group deployment
<!-- Skip: Output cannot be splitted from code -->
```powershell
New-AzResourceGroupDeployment -Name mynewstorageaccount -ResourceGroupName myrg -TemplateFile .\storage-account-create-azdeploy.json -TemplateParameterFile .\storage-account-create-azdeploy.parameters.json -AsJob

Просмотреть файл

@ -36,6 +36,7 @@ The **Remove-AzSearchQueryKey** cmdlet removes the query key from the Azure Cogn
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzSearchQueryKey -ResourceGroupName "TestAzureSearchPsGroup" -ServiceName "pstestazuresearch01"

Просмотреть файл

@ -43,6 +43,7 @@ psdemo-wps eastus Standard_S1
### Example 2: Create a Web PubSub resource with more parameters and show the result
<!-- Skip: Output cannot be splitted from code -->
```powershell
$wps = New-AzWebPubSub -ResourceGroupName psdemo -Name psdemo-wps `
-Location eastus -SkuName Standard_S1 -IdentityType SystemAssigned -LiveTraceEnabled true `

Просмотреть файл

@ -39,6 +39,7 @@ Update the Network ACL of a SignalR service, including the default action and th
## EXAMPLES
### Allow RESTAPI,ClientConnection for public network and set default action to Deny
<!-- Skip: Output cannot be splitted from code -->
```powershell
$networkAcl = Update-AzSignalRNetworkAcl -Name pssignalr -ResourceGroupName test_resource_group -DefaultAction Deny -PublicNetwork -Allow RESTAPI,ClientConnection

Просмотреть файл

@ -43,6 +43,7 @@ Operation to update an exiting resource.
## EXAMPLES
### Example 1: Update a Web PubSub resource
<!-- Skip: Output cannot be splitted from code -->
```powershell
$wps = Update-AzWebPubSub -ResourceGroupName psdemo -Name psdemo-wps `
-IdentityType SystemAssigned -LiveTraceEnabled true `

Просмотреть файл

@ -25,6 +25,7 @@ Note that you need to run *Enable-AzSqlServerAdvancedDataSecurity* and *Update-A
## EXAMPLES
### Example 1: Converts vulnerability assessment scan results and saves them to local disk
<!-- Skip: Output cannot be splitted from code -->
```powershell
Update-AzSqlServerVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `

Просмотреть файл

@ -33,6 +33,7 @@ Note that you need to run *Enable-AzSqlInstanceAdvancedDataSecurity* and *Update
## EXAMPLES
### Example 1 - Converts vulnerability assessment scan results and saves them to local disk
<!-- Skip: Output cannot be splitted from code -->
```powershell
Update-AzSqlInstanceVulnerabilityAssessmentSetting `
-ResourceGroupName "ResourceGroup01" `

Просмотреть файл

@ -323,6 +323,7 @@ ZoneRedundant : false
This command gets information about the instance named managedInstance1.
### Example 8: Get all instances assigned to a resource group with external administrator information
<!-- Skip: Output cannot be splitted from code -->
```powershell
$val = Get-AzSqlInstance -ResourceGroupName "ResourceGroup01" -ExpandActiveDirectoryAdministrator
@ -380,6 +381,7 @@ AzureADOnlyAuthentication : True
This command gets information about all instances assigned to the resource group ResourceGroup01. .
### Example 9: Get information about an instance with external administrator information
<!-- Skip: Output cannot be splitted from code -->
```powershell
$val = Get-AzSqlInstance -Name "managedInstance1" -ResourceGroupName "ResourceGroup01" -ExpandActiveDirectoryAdministrator

Просмотреть файл

@ -141,6 +141,7 @@ FullyQualifiedDomainName : server02.database.windows.net
This command gets information about all the Azure SQL Database servers assigned to the resource group ResourceGroup01 that start with "server".
### Example 5: Get all instances of SQL Server assigned to a resource group with external administrator information
<!-- Skip: Output cannot be splitted from code -->
```powershell
$val = Get-AzSqlServer -ResourceGroupName "ResourceGroup01" -ExpandActiveDirectoryAdministrator
@ -185,6 +186,7 @@ AzureADOnlyAuthentication : True
This command gets information about all the Azure SQL Database servers assigned to the resource group ResourceGroup01.
### Example 6: Get information about an Azure SQL Database server with external administrator information
<!-- Skip: Output cannot be splitted from code -->
```powershell
$val = Get-AzSqlServer -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -ExpandActiveDirectoryAdministrator
ResourceGroupName : resourcegroup01

Просмотреть файл

@ -25,6 +25,7 @@ If you specify the name of an allowed FQDN, this cmdlet gets information about t
## EXAMPLES
### Example 1: Get outbound firewall rule(s) for a server
<!-- Skip: Output cannot be splitted from code -->
```powershell
Get-AzSqlServerOutboundFirewallRule -ServerName "Server01" -ResourceGroupName "ResourceGroup01" -AllowedFQDN "OutboundFirewallRule01"

Просмотреть файл

@ -239,6 +239,7 @@ MaintenanceConfigurationId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
This command creates a new instance with maintenance configuration MI_2
### Example 7: Create a new instance with External(Azure Active Directory) Administrator, Azure Active Directory Only Authentication and no SqlAdministratorCredentials
<!-- Skip: Output cannot be splitted from code -->
```powershell
New-AzSqlInstance -Name managedInstance2 -ResourceGroupName ResourceGroup01 -ExternalAdminName DummyLogin -EnableActiveDirectoryOnlyAuthentication -Location westcentralus -SubnetId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" -LicenseType LicenseIncluded -StorageSizeInGB 1024 -VCore 16 -Edition "GeneralPurpose" -ComputeGeneration Gen4

Просмотреть файл

@ -47,6 +47,7 @@ Tags :
This command creates a version 12 Azure SQL Database server.
### Example 2: Create a new Azure SQL Database server with External(Azure Active Directory) Administrator, Azure Active Directory Only Authentication and no SqlAdministratorCredentials
<!-- Skip: Output cannot be splitted from code -->
```powershell
New-AzSqlServer -ResourceGroupName "ResourceGroup01" -Location "Central US" -ServerName "server01" -ServerVersion "12.0" -ExternalAdminName DummyLogin -EnableActiveDirectoryOnlyAuthentication
ResourceGroupName : resourcegroup01

Просмотреть файл

@ -27,6 +27,7 @@ Note that you need to run *Enable-AzSqlServerAdvancedDataSecurity* and *Update-A
## EXAMPLES
### Example 1: Set a vulnerability assessment rule baseline
<!-- Skip: Output cannot be splitted from code -->
```powershell
Set-AzSqlDatabaseVulnerabilityAssessmentRuleBaseline `
-ResourceGroupName "ahmadtesting" `

Просмотреть файл

@ -44,6 +44,7 @@ Set-AzSqlInstanceDatabase [-Tag <Hashtable>] [-ResourceId] <String> [-AsJob]
## EXAMPLES
### Example 1
<!-- Skip: Output cannot be splitted from code -->
```powershell
PS C:\> Set-AzSqlInstanceDatabase -Name "name1" -InstanceName "instance1" -ResourceGroupName "rg1" -Tags @{tag1="value1"}

Просмотреть файл

@ -52,6 +52,7 @@ The **Add-AzStorageAccountManagementPolicyAction** cmdlet adds an action to the
## EXAMPLES
### Example 1: Creates a ManagementPolicy Action Group object with 4 actions, then add it to a management policy rule and set to a Storage account
<!-- Skip: Output cannot be splitted from code -->
```
PS C:\>$action = Add-AzStorageAccountManagementPolicyAction -BaseBlobAction Delete -DaysAfterCreationGreaterThan 100
PS C:\>$action = Add-AzStorageAccountManagementPolicyAction -BaseBlobAction TierToArchive -daysAfterModificationGreaterThan 50 -DaysAfterLastTierChangeGreaterThan 40 -InputObject $action
@ -87,6 +88,7 @@ PS C:\>$policy = Set-AzStorageAccountManagementPolicy -ResourceGroupName "myreso
The first command create a ManagementPolicy Action Group object, the following 3 commands add 3 actions to the object. Then add it to a management policy rule and set to a Storage account.
### Example 2: Creates a ManagementPolicy Action Group object with 6 actions on snapshot and blob version, then add it to a management policy rule and set to a Storage account
<!-- Skip: Output cannot be splitted from code -->
```
PS C:\> $action = Add-AzStorageAccountManagementPolicyAction -SnapshotAction Delete -daysAfterCreationGreaterThan 40
PS C:\> $action = Add-AzStorageAccountManagementPolicyAction -InputObject $action -SnapshotAction TierToArchive -daysAfterCreationGreaterThan 50

Просмотреть файл

@ -80,6 +80,7 @@ PS C:\> Get-AzStorageFileHandle -ShareName "mysharename" -Path 'dir1/dir2' -Recu
This command lists all file handles on a file directory recursively, filters out the handles which are opened 1 day ago, and then closes them.
### Example 3: Close all file handles on a file directory recursively and show the closed file handle count
<!-- Skip: Output cannot be splitted from code -->
```
PS C:\> Close-AzStorageFileHandle -ShareName "mysharename" -Path 'dir1/dir2' -Recursive -CloseAll -PassThru
10

Просмотреть файл

@ -36,6 +36,7 @@ The **Disable-AzStorageBlobDeleteRetentionPolicy** cmdlet disables delete retent
## EXAMPLES
### Example 1: Disable delete retention policy for the Blob service
<!-- Skip: Output cannot be splitted from code -->
```
C:\PS>Disable-AzStorageBlobDeleteRetentionPolicy -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -PassThru

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше