azure-powershell

How can I get the PublishUrl via Azure PowerShell?

岁酱吖の 提交于 2019-12-02 03:08:00
问题 My goal is to be able to pass in a site name and location and have a new site created, retrieve the appropriate credentials/URLs and deploy my site with WebDeploy. I'm using the Azure Powershell Tools from here: http://www.windowsazure.com/en-us/downloads/ I am able to create a new website with New-AzureWebsite -Name site-name -Location "West US" In response to this I get details about the created site, including the publishing username and password (PublishingUsername and PublishingPassword)

Find Azure backup/retention associated with backup policy

瘦欲@ 提交于 2019-12-02 03:00:11
问题 I can get backup policy name via : How to find Azure VM applied backup protection policy name via Powershell BUT looking to find actual configuration associated with backuppolicy like following data : BACKUP FREQUENCY Daily at 00:00 RETENTION RANGE Retention of daily backup point Retain backup taken every day at 00:00 for 7 Day(s) Retention of weekly backup point Retain backup taken every week on Saturday at 00:00 for 4 Week(s) Retention of monthly backup point Retain backup taken every month

How can I get the PublishUrl via Azure PowerShell?

拟墨画扇 提交于 2019-12-02 02:41:01
My goal is to be able to pass in a site name and location and have a new site created, retrieve the appropriate credentials/URLs and deploy my site with WebDeploy. I'm using the Azure Powershell Tools from here: http://www.windowsazure.com/en-us/downloads/ I am able to create a new website with New-AzureWebsite -Name site-name -Location "West US" In response to this I get details about the created site, including the publishing username and password (PublishingUsername and PublishingPassword), the one piece of information I do not get that I need is the publishing URL (which I can retrieve

Azure Custom Script Extension. Execute script as another user

匆匆过客 提交于 2019-12-02 02:36:11
I'm using command1.ps1 script to install Azure Custom Script Extension on the target VM and execute command2.ps1. command2.ps1 is supposed to run a script (that is inside ScriptBlock) as domain administrator (hence -Credential $Credentials ). When I run command2.ps1 manually and input $domainAdminName and $domainAdminPassword it works, but when running it through command1.ps1 it doesn't work. Maybe the problem is cause by Azure Custom Script Extension running command2.ps1 as System account? Please, help me make the script work. command1.ps1: param ( [Parameter(Mandatory)] [String]

Start-AzureStorageBlobCopy vs AzCopy: which one takes lesser time

落爺英雄遲暮 提交于 2019-12-01 19:39:06
I need to move vhds from one subscription to other. I would like to know which one is better option for the same: Start-AzureStorageBlobCopy or AzCopy ? Which one takes lesser time ? Both of them would take the same time as all they do is initiate Async Server-Side Blob Copy . They just tell the service to start copying blob from source to destination. The actual copy operation is performed by Azure Blob Storage Service. The time it would take to copy the blob would depend on a number of factors including but not limited to: Source & destination location. Size of the source blob. Load on

Create an Azure VM with an unmanaged disk

旧巷老猫 提交于 2019-12-01 11:04:45
I'm trying to create an Azure VM with an unmanaged disk via PowerShell since managed disks aren't supported in Azure Government yet. None of the documentation I could find for PowerShell VM creation references managed or unmanaged disks and the default seems to be managed disks. My VM creation fails with the following error: New-AzureRmVM : Managed Disks are not supported in this region. ErrorCode: BadRequest Here's the script I'm using: $location = "USGovTexas" New-AzureRmResourceGroup -Name myResourceGroup -Location $location # Create a subnet configuration $subnetConfig = New

Several Azure AD. New-MsolServicePrincipal : Access Denied

微笑、不失礼 提交于 2019-12-01 11:00:28
I want to set my Azure Active Directory as an identity provider for SharePoint 2013 Foundation. I activated Azure trial from account that is a part of another infrastructure (my company's infrastructure). So what i have now: Azure VM with SharePoint 2013 Foundation installed. Created by me for testing purposes Azure Active Directory that is a part of my company's infrastructure. I don't have any permissions even to view it. But I see it since my company uses it Azure Active Directory with me as Global Admin (my-ad-name). Created by me for testing purposes Access Control Services. Created by me

Publish Azure Website to non-root folder from PowerShell

痴心易碎 提交于 2019-12-01 10:45:54
I'm testing my assumptions at the moment. I have my Asp.Net MVC application located at www.myapp.com/app and a third-party CMS system on www.myapp.com/ . The web-site is set up like described in this answer At the moment I can publish both of the applications separately and manually from Visual Studio and it works fine. However, I'm trying to publish my application from a build server where I'm using Azure Power-Shell scriplets: PS> Publish-AzureWebsiteProject -Name myApp -Package MyWebDeployPackage.zip However, documentation does not mention if you can publish with this scriplet to a non-root

How do I properly use ForEach() statement of List?

不羁岁月 提交于 2019-12-01 10:37:05
I'm confused what I'm doing wrong in ForEach method syntax of List? PS D:\ntt> $nicInfo.IpConfigurations.Count 2 PS D:\ntt> $nicInfo.IpConfigurations[0] PrivateIpAddressVersion Name Primary PrivateIpAddress PrivateIpAllocationMethod Subnet Name PublicIpAddress Name ProvisioningState ----------------------- ---- ------- ---------------- ------------------------- ----------- -------------------- ----------------- IPv4 ipconfig1 True 10.233.0.4 Dynamic Succeeded PS D:\ntt> $nicInfo.IpConfigurations.GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True List`1 System

Several Azure AD. New-MsolServicePrincipal : Access Denied

馋奶兔 提交于 2019-12-01 09:22:50
问题 I want to set my Azure Active Directory as an identity provider for SharePoint 2013 Foundation. I activated Azure trial from account that is a part of another infrastructure (my company's infrastructure). So what i have now: Azure VM with SharePoint 2013 Foundation installed. Created by me for testing purposes Azure Active Directory that is a part of my company's infrastructure. I don't have any permissions even to view it. But I see it since my company uses it Azure Active Directory with me