This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
windows:powershell [2020/05/12 10:52] – [Commands] tmade | windows:powershell [2020/06/19 15:51] – [Services] tmade | ||
---|---|---|---|
Line 6: | Line 6: | ||
Get-Service -Name puppet | Get-Service -Name puppet | ||
Start-Service -Name puppet | Start-Service -Name puppet | ||
- | ====Commands==== | ||
- | |||
- | $PSVersionTable.PSVersion | ||
- | Get-Module -Name PowerShellGet -ListAvailable | Select-Object -Property Name, | ||
- | Import-Module PowerShellGet -Force | ||
- | Get-ExecutionPolicy | ||
- | Set-ExecutionPolicy Unrestricted | ||
- | Install-Module -Name AZureRM -AllowClobber | ||
- | Import-Module -Name AzureRM | ||
- | Login-AzureRmAccount | ||
- | Get-AzureRmSubscription | ||
- | New-AzureRMRecourceGroup -Name groupname -Location westeurope | ||
- | |||
- | Create Storageaccount: | ||
- | |||
- | < | ||
- | Login-AzureRmAccount | ||
- | |||
- | Get-AzureRmSubscription | ||
- | |||
- | cd\ | ||
- | cls | ||
- | |||
- | $location = " | ||
- | $group = " | ||
- | |||
- | $account = New-AzureRmStorageAccount -ResourceGroupName $group -Name tw012018 -Location $location -SkuName Standard_LRS | ||
- | |||
- | Get-AzureRMStorageAccount | Select StorageAccountName, | ||
- | </ | ||
- | ====Azure CLI==== | ||
- | |||
- | https:// | ||
- | |||
- | Powershell install: | ||
- | |||
- | Invoke-WebRequest -Uri https:// | ||
- | |||
- | az login --use-device-code | ||
- | az login | ||
- | az group list --out table #show resource groups | ||
| | ||
- | Create resource groups: | + | ====Module Path==== |
- | + | ||
- | < | + | |
- | #Azure CLI | + | |
- | + | ||
- | az login | + | |
- | + | ||
- | $group | + | |
- | $location | + | |
- | $account | + | |
- | + | ||
- | az storage account create --resource-group-name $group --location $location --sku Standard_LRS --name $account | + | |
- | + | ||
- | az storage account show --resource-group $group --name $account | + | |
- | </ | + | |
+ | C:\Program Files\WindowsPowerShell\Modules | ||
+ | %programfiles%\WindowsPowerShell\Modules |