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
%windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true |
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
[AllowAnonymous] | |
[ValidateInput(false)] | |
public class AcsResponseController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
if (ControllerContext.HttpContext.Request.Form["wresult"] != null) | |
{ | |
// This is a response from the ACS - you can further inspect the message if you will | |
SignInResponseMessage message = |
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
Add-AzureAccount | |
Set-AzureSubscription "[Your Subscription Name]" -CurrentStorageAccountName "[StorageAccount_for_VHDs]" | |
$adminPassword = "Super_Secret_Password!" | |
$images = Get-AzureVMImage | where {$_.Label -match "Windows Server 2012 R2"} | |
$vmImage = $images[2] | |
$dnsServerLocal = New-AzureDns –Name "NameResolver" –IPAddress "127.0.0.1" | |
New-AzureVMConfig -Name "NameResolver" -InstanceSize Large -ImageName $vmImage.ImageName ` | | |
Add-AzureProvisioningConfig –Windows –Password $adminPassword -AdminUsername "astaykov" ` | | |
Set-AzureSubnet "NSNet" ` | |
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
# first authenticate using your Azure Active Directory credentials | |
Add-AzureAccount | |
# then list all the subscriptions to get the name | |
Get-AzureSubscription | |
# now set the subscription context as well as default storage account that | |
# will be used for rest of the operations | |
# note, the account has to be created in the same Affinity Group as the Virtual Network !! | |
Set-AzureSubscription "[YOUR Subscription Name]" -CurrentStorageAccountName "[azurestorageaccount]" |
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
# first save encrypted password to a file that can later be used | |
read-host -assecurestring | convertfrom-securestring | out-file d:\tmp\securestring.txt | |
# then use the saved password | |
$password = cat d:\tmp\securestring.txt | convertto-securestring | |
# currently (August, the 13nd, 2014) only organizational accounts are supported (also with custom domain). | |
# Microsoft Accounts (Live ID) are not supported | |
$username = "user@tenant.onmicrosoft.com" # or user@yourdomain.com if 'yourdomain.com' is registered with AAD | |
$mycred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username,$password | |
Add-AzureAccount -credential $mycred |
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
Add-AzureAccount | |
Select-AzureSubscription -SubscriptionName "Your_Subscription_Name" | |
$vm = Get-AzureVM -ServiceName "CloudServiceName" -Name "VM_Name" | |
for ($i=6100; $i -le 6120; $i++) | |
{ | |
$EndpointName = "FtpEndpoint_" | |
$EndpointName += $i | |
Add-AzureEndpoint -Name $EndpointName -Protocol "tcp" -PublicPort $i -LocalPort $i -VM $vm | |
} | |
$vm | Update-AzureVM |
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
cmd.exe /c $env:windir\system32\inetsrv\appcmd.exe list apppool "apppoolname" /text:ProcessModel.Password |
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
Add-AzureAccount | |
# use Select-AzureSubscription in case your account has more than one | |
Select-AzureSubscription -SubscriptionName 'PUT HERE YOUR SUBSCRIPTION' | |
[System.Xml.XmlDocument] $XmlConfig = New-Object System.Xml.XmlDocument | |
# load the Antimalware extension configuration from external XML file | |
# The content of the XML needs to be: | |
# <AntimalwareConfig><AntimalwareEnabled>true</AntimalwareEnabled></AntimalwareConfig> | |
# ref.: http://msdn.microsoft.com/en-US/library/azure/dn771718 | |
$XmlConfig.load('D:\tmp\AntiMalware.config') | |
Set-AzureServiceAntimalwareExtension -ServiceName "PUT HERE THE CLOUD SERVICE NAME" -AntimalwareConfiguration $XmlConfig |
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
netsh http add urlacl url=https://+:4444/ user=[Existing user on the system] | |
netsh http add sslcert ipport=0.0.0.0:4444 certhash=[thumbprint of SSL cert] appid={[GUID - a freely chosen GUID]} |
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
# Add the Azure Account first - this will create a login promppt | |
Add-AzureAccount | |
# when you have more then one subscription - you have explicitly select the one | |
# which holds your cloud service you want to update | |
Select-AzureSubscription "<Subscription name with spaces goes here>" | |
# then Update the configuration for the cloud service | |
Set-AzureDeployment -Config -ServiceName "<cloud_service_name_goes_here>" ` | |
-Configuration "D:/tmp/cloud/ServiceConfiguration.Cloud.cscfg" ` | |
-Slot "Production" |
OlderNewer