Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
windows:powershell [2020/05/12 10:52] – [Commands] tmadewindows:powershell [2021/12/06 09:56] (current) tmade
Line 6: Line 6:
   Get-Service -Name puppet   Get-Service -Name puppet
   Start-Service -Name puppet   Start-Service -Name puppet
-====Commands====+   
 +====Module Path====
  
-  $PSVersionTable.PSVersion                                                                                 #get version +  C:\Program Files\WindowsPowerShell\Modules 
-  Get-Module -Name PowerShellGet -ListAvailable | Select-Object -Property Name,Version,Path                 # +  %programfiles%\WindowsPowerShell\Modules
-  Import-Module PowerShellGet -Force                                                                        #Update Powershell version +
-  Get-ExecutionPolicy                                                                                       #check policy +
-  Set-ExecutionPolicy Unrestricted                                                                          #set policy to unrestricted +
-  Install-Module -Name AZureRM -AllowClobber                                                                #install azure module +
-  Import-Module -Name AzureRM                                                                               #import azure module - "Get-ExecutionPolicy" has to be set to unrestricted! +
-  Login-AzureRmAccount                                                                                      #login +
-  Get-AzureRmSubscription                                                                                   #check active login +
-  New-AzureRMRecourceGroup -Name groupname -Location westeurope                                             #creates new resourcegroup+
  
-Create Storageaccount: +====Commands====
- +
-<code> +
-Login-AzureRmAccount +
- +
-Get-AzureRmSubscription +
- +
-cd\ +
-cls +
- +
-$location "westeurope" +
-$group "test-vm-rg" +
- +
-$account New-AzureRmStorageAccount -ResourceGroupName $group -Name tw012018 -Location $location -SkuName Standard_LRS +
- +
-Get-AzureRMStorageAccount | Select StorageAccountName, Location +
-</code> +
-====Azure CLI==== +
- +
-https://docs.microsoft.com/de-de/cli/azure/install-azure-cli?view=azure-cli-latest +
- +
-Powershell install: +
- +
-  Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet' +
- +
-  az login --use-device-code                                                                                #generate url + machine-code +
-  az login +
-  az group list --out table                                                                                 #show resource groups+
      
-Create resource groups: +  Get-InstalledModule 
- +   
-<code> +====Network====
-#Azure CLI +
- +
-az login +
- +
-$group "test-vm-rg" +
-$location "westeurope" +
-$account "tw012018" +
- +
-az storage account create --resource-group-name $group --location $location --sku Standard_LRS --name $account +
- +
-az storage account show --resource-group $group --name $account +
-</code>+
  
 +  tnc -port PORT IP                  #Remote-Port check to test, if a firewall is opened or blocks
 +  tnc -port 443 1.2.3.4
windows/powershell.txt · Last modified: 2021/12/06 09:56 by tmade
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki