Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example 10 of Set-AzStorageAccount #21121

Merged
merged 2 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Storage/Storage.Management/help/Set-AzStorageAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,15 @@ The command upgrade a Storage account with Kind "Storage" or "BlobStorage" to "S

### Example 10: Update a Storage account by enable Azure Files AAD DS Authentication and set DefaultSharePermission.
```powershell
$account = Set-AzStorageAccount -ResourceGroupName "MyResourceGroup" -Name "mystorageaccount" -EnableAzureActiveDirectoryDomainServicesForFile $true -DefaultSharePermission StorageFileDataSmbShareOwner
$account = Set-AzStorageAccount -ResourceGroupName "MyResourceGroup" -Name "mystorageaccount" -EnableAzureActiveDirectoryDomainServicesForFile $true -DefaultSharePermission StorageFileDataSmbShareContributor

$account.AzureFilesIdentityBasedAuth
```

```output
DirectoryServiceOptions ActiveDirectoryProperties DefaultSharePermission
----------------------- ------------------------- ----------------------
AADDS Microsoft.Azure.Commands.Management.Storage.Models.PSActiveDirectoryProperties StorageFileDataSmbShareOwner
AADDS Microsoft.Azure.Commands.Management.Storage.Models.PSActiveDirectoryProperties StorageFileDataSmbShareContributor
```

The command update a Storage account by enable Azure Files AAD DS Authentication.
Expand Down
4 changes: 4 additions & 0 deletions tools/StaticAnalysis/Exceptions/Az.Storage/ExampleIssues.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"Module","Cmdlet","Example","Line","RuleName","ProblemId","Severity","Description","Extent","Remediation"
"Az.Storage","Set-AzStorageAccount","5","4","Invalid_Cmdlet","5000","1","New-AzKeyVault is not a valid command name.","New-AzKeyVault -VaultName 'MyKeyVault' -ResourceGroupName 'MyResourceGroup' -Location 'EastUS2'","Check the spell of New-AzKeyVault."
"Az.Storage","Set-AzStorageAccount","5","5","Invalid_Cmdlet","5000","1","Add-AzKeyVaultKey is not a valid command name.","Add-AzKeyVaultKey -VaultName 'MyKeyVault' -Name 'MyKey' -Destination 'Software'","Check the spell of Add-AzKeyVaultKey."
"Az.Storage","Set-AzStorageAccount","5","6","Invalid_Cmdlet","5000","1","Set-AzKeyVaultAccessPolicy is not a valid command name.","Set-AzKeyVaultAccessPolicy -VaultName 'MyKeyVault' -ObjectId $account.Identity.PrincipalId -PermissionsToKeys wrapkey,unwrapkey,get","Check the spell of Set-AzKeyVaultAccessPolicy."