Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
211 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
How To Configure Azure Resource Locks With Azure CLI/5bd4a5a5550d6d38ce632b48.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a TechSnips internal identifier text file. It can be safely removed if you've downloaded this. |
12 changes: 12 additions & 0 deletions
12
... With Azure CLI/NzpfKmbTQ76IWKvqX2mz_How to Configure Resource Locks with Azure CLI.azcli
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
az vm list | ||
|
||
az lock create --name DelLock --lock-type CanNotDelete --resource-group rg-we-TestVMs --resource-name TestVM1 --resource-type Microsoft.Compute/virtualMachines | ||
|
||
az lock list | ||
|
||
az lock list --resource-group rg-we-TestVMs | ||
|
||
$vmlock=$(az lock show --name DelLock --resource-group rg-we-TestVMs --resource-name TestVM1 --resource-type Microsoft.Compute/virtualMachines --output tsv --query id) | ||
|
||
az lock delete --ids $vmlock |
1 change: 1 addition & 0 deletions
1
How To Configure IIS For Remote Administration Using PowerShell/5bd4a5a5051dd087315ecd5f.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a TechSnips internal identifier text file. It can be safely removed if you've downloaded this. |
31 changes: 31 additions & 0 deletions
31
...S For Remote Administration Using PowerShell/HzKdWMGhRrS9B8PMoecT_RemoteIISManagement.ps1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
$server = '' | ||
|
||
Enter-PSSession $server | ||
|
||
# See if the Web Management feature is installed | ||
Get-WindowsFeature Web-Mgmt-Service | ||
|
||
# Add Web Management Feature | ||
Add-WindowsFeature Web-Mgmt-Service | ||
|
||
# Get the current value of EnableRemoteManagement | ||
Get-ItemProperty -Path 'HKLM:\Software\Microsoft\WebManagement\Server' -Name EnableRemoteManagement | ||
|
||
# Change EnableRemoteManagement value to 1 to allow remote connections | ||
Set-ItemProperty -Path 'HKLM:\Software\Microsoft\WebManagement\Server' -Name EnableRemoteManagement -Value 1 | ||
|
||
# Get the Web Management Service Firewall rule | ||
Get-NetFirewallRule IIS-WebServerRole-WMSVC-In-TCP | ||
|
||
# New-NetFirewallRule -DisplayName "Web Management Service" -Direction Inbound -LocalPort 8172 -Protocol TCP -Action Allow | ||
|
||
# Get the Web Management Service status | ||
Get-Service WMSVC | ||
|
||
# Start the Web Management Service | ||
Start-Service WMSVC | ||
|
||
# Set the WMSVC service to start automatically | ||
Set-Service WMSVC -StartupType Automatic | ||
|
1 change: 1 addition & 0 deletions
1
...nnect An Azure VM To Azure Log Analytics With A VM Extension/5b983301d836077c86b706c8.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a TechSnips internal identifier text file. It can be safely removed if you've downloaded this. |
20 changes: 20 additions & 0 deletions
20
...nLIS6SLONmqMY9K_How To Connect An Azure VM To Azure Log Analytics With A VM Extension.ps1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
$EXT = Get-AzureRmVmImagePublisher -Location "UKWest" | Get-AzureRmVMExtensionImageType | Get-AzureRmVMExtensionImage | ||
$EXT | Select-Object Type, PublisherName, Version | ft -AutoSize | ||
|
||
$PublicSettings = @{"workspaceId" = "d45a477a-765f-40b3-8656-a721be15xxxx"} | ||
$ProtectedSettings = @{"workspaceKey" = "3fuiw7DqvJ0OUWQ+Aj9/Z7Pw5YLGBKQw6kAbd6Qz8H2t7gc66YRbkwAnoZeL5JssXh9jZuy0OuJbFtLrQtxxxx=="} | ||
|
||
$splat = @{ | ||
ExtensionName = "Microsoft.EnterpriseCloud.Monitoring" | ||
Publisher = "Microsoft.EnterpriseCloud.Monitoring" | ||
ExtensionType = "MicrosoftMonitoringAgent" | ||
ResourceGroupName = "RG-WE-TESTVMS" | ||
VMName = "TestVM1" | ||
TypeHandlerVersion = "1.0" | ||
Settings = $PublicSettings | ||
ProtectedSettings = $ProtectedSettings | ||
Location = "westeurope" | ||
AsJob = $True | ||
} | ||
Set-AzureRmVMExtension @splat |
1 change: 1 addition & 0 deletions
1
How To Create An Azure DNS Zone And Record Using PowerShell/5bd4a5a5776e9c659c30728d.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a TechSnips internal identifier text file. It can be safely removed if you've downloaded this. |
16 changes: 16 additions & 0 deletions
16
...hell/yst1uARfSdudVD45j6sn_How To Create An Azure DNS Zone And Record Using PowerShell.ps1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
#Connect-AzureRmAccount | ||
|
||
New-AzureRMResourceGroup -name DNSZones -location "westeurope" | ||
|
||
New-AzureRmDnsZone -Name domain.com -ResourceGroupName DNSZones | ||
|
||
Get-AzureRmDnsZone | ||
|
||
Get-AzureRmDnsRecordSet -ZoneName domain.com -resourcegroupname DNSZones | ||
|
||
New-AzureRmDnsRecordSet -Name www -RecordType A -ZoneName domain.com -ResourceGroupName DNSZones -Ttl 3600 -DnsRecords (New-AzureRmDnsRecordConfig -IPv4Address "10.10.10.10") | ||
|
||
Remove-AzureRmDnsRecordSet -name ww -RecordType CNAME -ZoneName domain.com -ResourceGroupName DNSZones | ||
|
||
Remove-AzureRmDnsZone -Name domain.com -ResourceGroupName DNSZones |
1 change: 1 addition & 0 deletions
1
...e And Configure An Azure DNS Zone And Records With Azure CLI/5bd4a5a5a989e66228e13f1f.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a TechSnips internal identifier text file. It can be safely removed if you've downloaded this. |
14 changes: 14 additions & 0 deletions
14
... CLI/MWGnz5aUQnurWQzT6rsw_How To Create An Azure DNS Zone And Record with Azure CLI.azcli
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
az group create --name DNSZones --location "westeurope" | ||
|
||
az network dns zone create -g DNSZones -n domain.com | ||
|
||
az network dns zone list | ||
|
||
az network dns record-set a add-record -g DNSZones -z domain.com -n www -a 10.10.10.10 | ||
|
||
az network dns record-set cname set-record -g DNSZones -z domain.com -n ww -c www.domain.com | ||
|
||
az network dns record-set cname remove-record -g DNSZones -z domain.com -n ww -c ww.domain.com | ||
|
||
az group delete --name DNSZones |
1 change: 1 addition & 0 deletions
1
How To Create And Use Azure Resource Locks With PowerShell/5bd4a5a53850144f5f930c35.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a TechSnips internal identifier text file. It can be safely removed if you've downloaded this. |
16 changes: 16 additions & 0 deletions
16
...Shell/pEOqhVgcS9WcRLqqx5Ej_How To Create And Use Azure Resource Locks With PowerShell.ps1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Connect-AzureRmAccount | ||
|
||
New-AzureRmResourceLock | ||
|
||
$splat =@{ | ||
LockName = 'ROLock' | ||
LockLevel = 'Readonly' | ||
ResourceGroupName = 'rg-we-TestVMs' | ||
Force = $true | ||
} | ||
|
||
New-AzureRmResourceLock @splat | ||
|
||
Get-AzureRmResourceLock | Select-Object Name, ResourceName, Properties | ||
|
||
Get-AzureRmResourceLock | Out-GridView -PassThru | Remove-AzureRmResourceLock -Force |
1 change: 1 addition & 0 deletions
1
...tall The AzureRM PowerShell Module And Authenticate To Azure/5bd4a5a5abc68d866902c8c8.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a TechSnips internal identifier text file. It can be safely removed if you've downloaded this. |
16 changes: 16 additions & 0 deletions
16
...reRM PowerShell Module And Authenticate To Azure/QgfmW2cBRqA31YIzNMgD_Install-AzureRM.ps1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#Check to see if the module is already installed | ||
Get-Module -ListAvailable | Where-Object -Property Name -Like "*Azure*" | ||
|
||
#Install the AzureRM module from the PowerShell Gallery | ||
Install-Module -Name AzureRM | ||
|
||
#Connect and authenticate to your Azure subscription | ||
Connect-AzureRmAccount | ||
|
||
#Verify success by listing resource groups | ||
Get-AzureRmResourceGroup | Select-Object -Property ResourceGroupName,Location | ||
|
||
#Add the PowerShell Gallery as a trusted repository | ||
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | ||
Get-PSRepository | ||
|
1 change: 1 addition & 0 deletions
1
... Built-in Windows 10 Apps For All Users Using PowerShell (1)/5b0b41eace03245da7972917.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a TechSnips internal identifier text file. It can be safely removed if you've downloaded this. |
69 changes: 69 additions & 0 deletions
69
...in Windows 10 Apps For All Users Using PowerShell (1)/Qu7ZzlhAQlqdHOThKRty_removeapps.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
Uninstall Calculator: | ||
|
||
Get-AppxPackage *windowscalculator* | Remove-AppxPackage | ||
Uninstall 3D Builder: | ||
|
||
Get-AppxPackage *3dbuilder* | Remove-AppxPackage | ||
Uninstall Calendar and Mail: | ||
|
||
Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage | ||
Uninstall Alarms and Clock: | ||
|
||
Get-AppxPackage *windowsalarms* | Remove-AppxPackage | ||
Uninstall Camera: | ||
|
||
Get-AppxPackage *windowscamera* | Remove-AppxPackage | ||
Uninstall Get Office: | ||
|
||
Get-AppxPackage *officehub* | Remove-AppxPackage | ||
Uninstall Get Started: | ||
|
||
Get-AppxPackage *getstarted* | Remove-AppxPackage | ||
Uninstall Get Skype: | ||
|
||
Get-AppxPackage *skypeapp* | Remove-AppxPackage | ||
Uninstall Groove Music: | ||
|
||
Get-AppxPackage *zunemusic* | Remove-AppxPackage | ||
Uninstall Maps: | ||
|
||
Get-AppxPackage *windowsmaps* | Remove-AppxPackage | ||
Uninstall Microsoft Solitaire Collection: | ||
|
||
Get-AppxPackage *solitairecollection* | Remove-AppxPackage | ||
Uninstall Money: | ||
|
||
Get-AppxPackage *bingfinance* | Remove-AppxPackage | ||
Uninstall Movies & TV: | ||
|
||
Get-AppxPackage *zunevideo* | Remove-AppxPackage | ||
Uninstall News: | ||
|
||
Get-AppxPackage *bingnews* | Remove-AppxPackage | ||
Uninstall OneNote: | ||
|
||
Get-AppxPackage *onenote* | Remove-AppxPackage | ||
Uninstall People: | ||
|
||
Get-AppxPackage *people* | Remove-AppxPackage | ||
Uninstall Phone Companion: | ||
|
||
Get-AppxPackage *windowsphone* | Remove-AppxPackage | ||
Uninstall Photos: | ||
|
||
Get-AppxPackage *photos* | Remove-AppxPackage | ||
Uninstall Sports: | ||
|
||
Get-AppxPackage *bingsports* | Remove-AppxPackage | ||
Uninstall Store: | ||
|
||
Get-AppxPackage *windowsstore* | Remove-AppxPackage | ||
Uninstall Voice Recorder: | ||
|
||
Get-AppxPackage *soundrecorder* | Remove-AppxPackage | ||
Uninstall Weather: | ||
|
||
Get-AppxPackage *bingweather* | Remove-AppxPackage | ||
Uninstall Xbox: | ||
|
||
Get-AppxPackage *xboxapp* | Remove-AppxPackage |
1 change: 1 addition & 0 deletions
1
How To Resize A Virtual Machine In Azure With PowerShell/5bd4a5a59dc05603ca65571e.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a TechSnips internal identifier text file. It can be safely removed if you've downloaded this. |
8 changes: 8 additions & 0 deletions
8
...owerShell/FMOnD48QOSMM4UbojryA_How to resize an Azure Virtual Machine with PowerShell.ps1
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
function Resize-AzureRMVM ($VM, $VMNewSize) { | ||
|
||
$VirtualMachine = Get-AzureRmVM | Where-Object {$_.name -eq $VM} | ||
|
||
$VirtualMachine.HardwareProfile.VmSize = $VMNewSize | ||
|
||
$VirtualMachine | Update-AzureRmVM -AsJob | ||
} |