This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To connect | |
$ServerName = "ServerName.cloudapp.net" | |
$port = '5986' | |
#region creds | |
$adminname = 'user.name' | |
$adminpassword = 'paasword' | |
#endregion | |
$password = ConvertTo-SecureString $adminpassword -AsPlainText -Force | |
$cred= New-Object System.Management.Automation.PSCredential (".\$adminname", $password) | |
### Enter session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Log into Azure ARM | |
Login-AzureRmAccount | |
### Choose subscription 'new' Azure | |
$subscription = (Get-AzureRmSubscription | Out-GridView -Title "Select the Azure subscription that you want to use ..." -PassThru).SubscriptionName | |
Select-AzureRmSubscription -SubscriptionName $subscription | |
Import-Module "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Network\AzureRM.Network.psd1" | |
########################################################################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Log into Azure ARM | |
Login-AzureRmAccount | |
### Choose subscription 'new' Azure | |
$subscription = (Get-AzureRmSubscription | Out-GridView -Title "Select the Azure subscription that you want to use ..." -PassThru).SubscriptionName | |
Select-AzureRmSubscription -SubscriptionName $subscription | |
Import-Module "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Network\AzureRM.Network.psd1" | |
########################################################################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Log into both old and new Azure | |
Login-AzureRmAccount | |
#Choose subscription 'new' Azure | |
$subscription = (Get-AzureRmSubscription | Out-GridView -Title "Select the Azure subscription that you want to use ..." -PassThru).SubscriptionName | |
Select-AzureRmSubscription -SubscriptionName $subscription | |
########################################################################## | |
############################# NSG DMZ ############################# | |
########################################################################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Log into both old and new Azure | |
Login-AzureRmAccount | |
#Choose subscription 'new' Azure | |
$subscription = (Get-AzureRmSubscription | Out-GridView -Title "Select the Azure subscription that you want to use ..." -PassThru).SubscriptionName | |
Select-AzureRmSubscription -SubscriptionName $subscription | |
$RGName = "Show-DMZ_VM" | |
$location = "australiaeast" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Log into both old and new Azure | |
Login-AzureRmAccount | |
#Choose subscription 'new' Azure | |
$subscription = (Get-AzureRmSubscription | Out-GridView -Title "Select the Azure subscription that you want to use ..." -PassThru).SubscriptionName | |
Select-AzureRmSubscription -SubscriptionName $subscription | |
$RGName = "Show-Internal_VMs" | |
$location = "australiaeast" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$RadioFormat = 'Kiis' | |
$WritetoTableStorage = 'Yes' | |
$TableName = "JustPlayedKiis" | |
#Define the storage account and context. | |
$StorageAccountName = "StorageAccountName" | |
$StorageAccountKey = "StorageAccountKey" | |
$Ctx = New-AzureStorageContext $StorageAccountName -StorageAccountKey $StorageAccountKey | |
#region Clear the cache (variables) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Install Modules | |
# Run as Administrator | |
Find-Module AzureRM.OperationalInsights | Install-Module | |
# Or run as the current user | |
Install-Module AzureRM.OperationalInsights -Scope CurrentUser | |
#endregion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'ExtendedUIHoverTime' -PropertyType DWord -Value 2328 -Force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Connect to Remote PowerShell WinRM HTTPS port 5986 with untrusted certificate - single connection | |
### Variables | |
$ServerName = "ServerName / or / IP Address" | |
$adminname = 'UserName' | |
$adminpassword = 'Password' | |
$password = ConvertTo-SecureString $adminpassword -AsPlainText -Force | |
$cred= New-Object System.Management.Automation.PSCredential (".\$adminname", $password) | |
### Enter session | |
$SessionOptions = New-PSSessionOption –SkipCACheck –SkipCNCheck –SkipRevocationCheck | |
Enter-PSSession -ComputerName $ServerName -Port 5986 -UseSSL -Credential $cred -SessionOption $SessionOptions |