Azure: Difference between revisions

From Piszczynski
piszczynski>Aleks
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 40: Line 40:
Create new user accounts:
Create new user accounts:
*New-AzureADUser
*New-AzureADUser
== Azure updates ==
See the following article on service tags to enable azure services / updates [https://learn.microsoft.com/en-us/azure/virtual-network/service-tags-overview MS KB]
== Azure Machine Sizing ==
Azure machine sizing list of benchmark scores:
[https://learn.microsoft.com/en-gb/azure/virtual-machines/linux/compute-benchmark-scores Benchmark Scores]

Latest revision as of 17:16, 17 November 2023

Azure

Set Subsctiption in powershell session: Look at the subscriptions and select the id of the one you want:

  • Get-AzSubscription
  • $Context = Get-AzSubscription -SubscriptionID <subID>; Set-AzContext $Context


Azure CLI

Install Azure CLI:

  • winget install -e --id Microsoft.AzureCLI

Identify data locations in shell

  • df

Azure powershell

Get Policy info

  • Get-AzPolicyDefinition | where {$_.Properties.DisplayName -eq "<policyname>"}

Assign to pass to commands

  • $definition = Get-AzPolicyDefinition | where {$_.Properties.DisplayName -eq "<policyname>"}


Get Resource group info - Best to Create object of group for use in commands

  • Get-AzResourceGroup <name of group>
  • $rg = Get-AzResourceGroup <Name of group>


Assign Policy

  • New-AzPolicyAssignment -Name "NameofPolicy" -DisplayName "Displaynamofpolicy" -scope $rg.ResourceId -PolicyDefinition <AZpolicy definition>


Azure User Accounts

Create new user accounts:

  • New-AzureADUser

Azure updates

See the following article on service tags to enable azure services / updates MS KB

Azure Machine Sizing

Azure machine sizing list of benchmark scores:

Benchmark Scores