Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
erich-wang committed Apr 27, 2020
2 parents 34b1bb1 + 9453fe4 commit a468c0b
Show file tree
Hide file tree
Showing 233 changed files with 13,259 additions and 591 deletions.
2 changes: 1 addition & 1 deletion documentation/development-docs/help-generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Whenever the public interface for a cmdlet has changed, the corresponding markdo
To update all of the markdown files for a single module, use the [`Update-MarkdownHelpModule`](https://github.com/PowerShell/platyPS/blob/master/docs/Update-MarkdownHelpModule.md) cmdlet:

```powershell
$PathToModuleManifest = "../../<module.psd1" # Full path to the module manifest that you have updated
$PathToModuleManifest = "../../<module>.psd1" # Full path to the module manifest that you have updated
Import-Module -Name $PathToModuleManifest
$PathToHelpFolder = "../../help" # Full path to help folder containing markdown files to be updated
Expand Down
2 changes: 1 addition & 1 deletion documentation/tooling/static-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The dependency analyzer can be found in the [`DependencyAnalyzer`](https://githu
The help analyzer can be found in the [`HelpAnalyzer`](https://github.com/Azure/azure-powershell/tree/01a81fbb7ea6c086fff2bc137053168c0fc7728a/tools/StaticAnalysis/HelpAnalyzer) folder. In this folder, you will find the following classes:

- `HelpAnalyzer`
- The implementation of the `IStaticAnalyzer` interface; determines which modules to analyze and checks to see which cmdlets within those modules don't have a corresponding markdown help file
- The implementation of the `IStaticAnalyzer` interface; determines which modules to analyze and checks to see which cmdlets within those modules don't have a corresponding markdown help file. It also checks the content structure of markdown help conforms to [PlatyPS Schema](https://github.com/PowerShell/platyPS/blob/master/platyPS.schema.md)
- `HelpIssues`
- The implementation of the `IReportRecord` interface; defines what a help exception looks like when it's reported in the `HelpIssues.csv` file that is found in the build artifacts of a CI run, as well as how to compare a new record to a record found in the existing `HelpIssues.csv` file used for exception suppressions

Expand Down
19 changes: 18 additions & 1 deletion src/Accounts/Accounts/AzureRmAlias/Mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,24 @@
"Get-AzSecurityTask": "Get-AzureRmSecurityTask",
"Get-AzSecurityWorkspaceSetting": "Get-AzureRmSecurityWorkspaceSetting",
"Set-AzSecurityWorkspaceSetting": "Set-AzureRmSecurityWorkspaceSetting",
"Remove-AzSecurityWorkspaceSetting": "Remove-AzureRmSecurityWorkspaceSetting"
"Remove-AzSecurityWorkspaceSetting": "Remove-AzureRmSecurityWorkspaceSetting",
"Get-AzSecurityAnalytics": "Get-AzureRmIotSecurityAnalytics",
"Disable-AzIotSecurityAnalyticsAggregatedAlert": "Disable-AzureRmIotSecurityAnalyticsAggregatedAlert",
"Get-AzIotSecurityAnalyticsAggregatedAlert": "Get-AzureRmIotSecurityAnalyticsAggregatedAlert",
"Get-AzIotSecurityAnalyticsAggregatedRecommendation": "Get-AzureRmIotSecurityAnalyticsAggregatedRecommendation",
"Get-AzDeviceSecurityGroup": "Get-AzureRmDeviceSecurityGroup",
"Set-AzDeviceSecurityGroup": "Set-AzureRmDeviceSecurityGroup",
"Remove-AzDeviceSecurityGroup": "Remove-AzureRmDeviceSecurityGroup",
"New-AzDeviceSecurityGroupAllowlistCustomAlertRuleObject": "New-AzureRmDeviceSecurityGroupAllowlistCustomAlertRuleObject",
"New-AzDeviceSecurityGroupDenylistCustomAlertRuleObject": "New-AzureRmDeviceSecurityGroupDenylistCustomAlertRuleObject",
"New-AzDeviceSecurityGroupThresholdCustomAlertRuleObject": "New-AzureRmDeviceSecurityGroupThresholdCustomAlertRuleObject",
"New-AzDeviceSecurityGroupTimeWindowRuleObject": "New-AzureRmDeviceSecurityGroupTimeWindowRuleObject",
"Get-AzIotSecuritySolution": "Get-AzureRmIotSecuritySolution",
"Set-AzIotSecuritySolution": "Set-AzureRmIotSecuritySolution",
"Remove-AzIotSecuritySolution": "Remove-AzureRmIotSecuritySolution",
"Update-AzIotSecuritySolution": "Update-AzureRmIotSecuritySolution",
"New-AzIotSecuritySolutionRecommendationConfigurationObject": "New-AzureRmIotSecuritySolutionRecommendationConfigurationObject",
"New-AzIotSecuritySolutionUserDefinedResourcesObject": "New-AzureRmIotSecuritySolutionUserDefinedResourcesObject"
},
"Az.ServiceBus": {
"New-AzServiceBusNamespace": "New-AzureRmServiceBusNamespace",
Expand Down
40 changes: 24 additions & 16 deletions src/Accounts/Accounts/help/Disable-AzDataCollection.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ schema: 2.0.0
# Disable-AzDataCollection

## SYNOPSIS
Opts out of collecting data to improve the AzurePowerShell cmdlets.
Data is not collected unless you explicitly opt in.
Opts out of collecting data to improve the Azure PowerShell cmdlets. Data is collected by default
unless you explicitly opt out.

## SYNTAX

Expand All @@ -18,27 +18,30 @@ Disable-AzDataCollection [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-
```

## DESCRIPTION
You can improve the experience of using the Microsoft Cloud and Azure PowerShell by opting in to data collection.
Azure PowerShell does not collect data without your consent - you must explicitly opt in by executing Enable-AzDataCollection, or by answering yes when Azure PowerShell prompts you about collecting data the first time you execute a cmdlet.
Microsoft aggregates collected data to identify patterns of usage, to identify common issues and to improve the experience of using Azure PowerShell.
Microsoft Azure PowerShell does not collect any private data, or any personally identifiable information.
Run the Disable-AzDataCollection cmdlet to disable data collection for the current user.
This will prevent the current user from being prompted about data collection the first time cmdlets are executed.
To enable data collection for the current user, run the Enable-AzDataCollection cmdlet.

The `Disable-AzDataCollection` cmdlet is used to opt out of data collection. Azure PowerShell
automatically collects telemetry data by default. To disable data collection, you must explicitly
opt-out. Microsoft aggregates collected data to identify patterns of usage, to identify common
issues, and to improve the experience of Azure PowerShell. Microsoft Azure PowerShell doesn't
collect any private or personal data. If you've previously opted out, run the
`Enable-AzDataCollection` cmdlet to re-enable data collection for the current user on the current
machine.

## EXAMPLES

### Example 1: Disabling data collection for the current user
```
PS C:\> Disable-AzDataCollection
```

This example shows how to disable data collection for the current user.
The following example shows how to disable data collection for the current user.

```powershell
Disable-AzDataCollection
```

## PARAMETERS

### -DefaultProfile
The credentials, account, tenant and subscription used for communication with azure.

The credentials, account, tenant, and subscription used for communication with Azure.

```yaml
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Expand All @@ -53,6 +56,7 @@ Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Expand All @@ -68,6 +72,7 @@ Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Expand All @@ -83,7 +88,11 @@ Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters).
## INPUTS
Expand All @@ -98,4 +107,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## RELATED LINKS
[Enable-AzDataCollection](./Enable-AzDataCollection.md)
40 changes: 23 additions & 17 deletions src/Accounts/Accounts/help/Enable-AzDataCollection.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ schema: 2.0.0
# Enable-AzDataCollection

## SYNOPSIS
Enables Azure PowerShell to collect data to improve the user experience with AzurePowerShell cmdlets.
Executing this cmdlet opts in to data collection for the current user on the current machine.
No data is collected unless you explicitly opt in.
Enables Azure PowerShell to collect data to improve the user experience with the Azure PowerShell
cmdlets. Executing this cmdlet opts in to data collection for the current user on the current
machine. Data is collected by default unless you explicitly opt out.

## SYNTAX

Expand All @@ -19,27 +19,28 @@ Enable-AzDataCollection [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-C
```

## DESCRIPTION
You can improve the experience of using the Microsoft Cloud and Azure PowerShell by opting in to data collection.
Azure PowerShell does not collect data without your consent - you must explicitly opt in by executing Enable-AzDataCollection, or by answering yes when Azure PowerShell prompts you about collecting data the first time you execute a cmdlet.
Microsoft aggregates collected data to identify patterns of usage, to identify common issues and to improve the experience of using Azure PowerShell.
Microsoft Azure PowerShell does not collect any private data, or any personally identifiable information.
Run the Enable-AzDataCollection cmdlet to enable data collection for the current user on the current machine.
This will prevent the current user from being prompted about data collection the first time cmdlets are executed.
To disable data collection for the current user, run the Disable-AzDataCollection cmdlet.

The `Enable-AzDataCollection` cmdlet is used to opt in to data collection. Azure PowerShell
automatically collects telemetry data by default. Microsoft aggregates collected data to identify
patterns of usage, to identify common issues, and to improve the experience of Azure PowerShell.
Microsoft Azure PowerShell doesn't collect any private or personal data. To disable data collection,
you must explicitly opt out by executing `Disable-AzDataCollection`.

## EXAMPLES

### Example 1: Enabling data collection for the current user
```
PS C:\> Enable-AzDataCollection
```

This example shows how to enable data collection for the current user.
The following example shows how to enable data collection for the current user.

```powershell
Enable-AzDataCollection
```

## PARAMETERS

### -DefaultProfile
The credentials, account, tenant and subscription used for communication with azure.

The credentials, account, tenant, and subscription used for communication with Azure.

```yaml
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Expand All @@ -54,6 +55,7 @@ Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
```yaml
Expand All @@ -69,6 +71,7 @@ Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml
Expand All @@ -84,7 +87,11 @@ Accept wildcard characters: False
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters).
## INPUTS
Expand All @@ -99,4 +106,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## RELATED LINKS
[Disable-AzDataCollection](./Disable-AzDataCollection.md)
2 changes: 1 addition & 1 deletion src/DataShare/DataShare.Test/DataShare.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.DataShare" Version="0.9.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.DataShare" Version="1.0.1" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions src/DataShare/DataShare.Test/ScenarioTests/AdlsGen1Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ function Test-AdlsGen1Crud
$AccountName = getAssetName
$ShareName = getAssetName
$DataSetName = getAssetName
$StorageAccountId = getAssetName
$FolderPath = getAssetName
$FileName = getAssetName
$StorageAccountId = "/subscriptions/e3c4699f-415a-4437-901e-3be6271b5113/resourceGroups/dsktestingstorageRG/providers/Microsoft.DataLakeStore/accounts/psstorage"
$FolderPath = "providerFolder"
$FileName = "psFilePath"
$createdFolderDataset = New-AzDataShareDataSet -ResourceGroupName $resourceGroup -AccountName $AccountName -ShareName $ShareName -Name $DataSetName -StorageAccountResourceId $StorageAccountId -AdlsGen1FolderPath $FolderPath

Assert-NotNull $createdFolderDataset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function Test-InvitationCrud
$removed = Remove-AzDataShareInvitation -AccountName $AccountName -ResourceGroupName $resourceGroup -ShareName $ShareName -Name $InvitationName -PassThru

Assert-True { $removed }
Assert-ThrowsContains { Get-AzDataShareInvitation -AccountName $AccountName -ResourceGroupName $resourceGroup -ShareName $ShareName -Name $InvitationName} "Resource 'sdktestinginvitation' does not exist"
Assert-ThrowsContains { Get-AzDataShareInvitation -AccountName $AccountName -ResourceGroupName $resourceGroup -ShareName $ShareName -Name $InvitationName} "Resource 'psinvitation' does not exist"
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,4 @@ function Test-ProviderShareSubscriptionGet
Assert-AreEqual $shareSubscriptionName $retrievedProviderShareSubscription.Name
Assert-AreEqual $ShareSubscriptionId $retrievedProviderShareSubscription.ShareSubscriptionObjectId
Assert-AreEqual "Active" $retrievedProviderShareSubscription.ShareSubscriptionStatus
Assert-AreEqual "Microsoft" $retrievedProviderShareSubscription.Company
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ function Test-ShareSubscriptionCrud
$AccountName = getAssetName
$ShareSubscriptionName = getAssetName
$InvitationId = "80f618dc-2ca8-4f99-83ee-9d2889066c6d"
$createdShareSubscription = New-AzDataShareSubscription -AccountName $AccountName -ResourceGroupName $resourceGroup -Name $ShareSubscriptionName -InvitationId $InvitationId
$SourceShareLocation = "eastus2"
$createdShareSubscription = New-AzDataShareSubscription -AccountName $AccountName -ResourceGroupName $resourceGroup -Name $ShareSubscriptionName -InvitationId $InvitationId -SourceShareLocation $SourceShareLocation

Assert-NotNull $createdShareSubscription
Assert-AreEqual $ShareSubscriptionName $createdShareSubscription.Name
Assert-AreEqual "Active" $createdShareSubscription.ShareSubscriptionStatus
Assert-AreEqual $InvitationId $createdShareSubscription.InvitationId
Assert-AreEqual $SourceShareLocation $createdShareSubscription.SourceShareLocation
Assert-AreEqual "Succeeded" $createdShareSubscription.ProvisioningState

$retrievedShareSubscription = Get-AzDataShareSubscription -AccountName $AccountName -ResourceGroupName $resourceGroup -Name $ShareSubscriptionName
Expand All @@ -33,7 +35,7 @@ function Test-ShareSubscriptionCrud
$removed = Remove-AzDataShareSubscription -AccountName $AccountName -ResourceGroupName $resourceGroup -Name $ShareSubscriptionName -PassThru

Assert-True { $removed }
Assert-ThrowsContains { Get-AzDataShareSubscription -AccountName $AccountName -ResourceGroupName $resourceGroup -Name $ShareSubscriptionName } "Resource 'sdktestingsharesub1' does not exist"
Assert-ThrowsContains { Get-AzDataShareSubscription -AccountName $AccountName -ResourceGroupName $resourceGroup -Name $ShareSubscriptionName } "Resource 'pssharesub1' does not exist"
}
finally
{
Expand Down
Loading

0 comments on commit a468c0b

Please sign in to comment.