• RELEVANCY SCORE 3.58

    DB:3.58:How We Can Remotely Access Contents Of A Azure File Share Mounted On Vm 8a




    Hi Team,
    We are not able to remotely access contents of an azure file share(mounted on azure vm) either through custom script extension or through remote powershell.
    Our Powershell is not able recognized mounted azure file share(z drive).
    Please share inputs(if any)

    Regards
    Gaurav Tyagi

    DB:3.58:How We Can Remotely Access Contents Of A Azure File Share Mounted On Vm 8a

    Hi,
    1. What exactly happens?
    2. Do you get any error message?
    You can refer to this link, which clearly talks about Microsoft Azure File Service and powershell cmdlets
    and more:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx
    Kindly, let us know if it helps.
    Regards,
    Azam khan

  • RELEVANCY SCORE 3.57

    DB:3.57:[Forum Faq] Using Set-Azurevnetgatewaykey Cmdlet In Azure Powershell z9




    Symptom:
    When we create a VNet-to-VNet connection in Azure, the last step is to set the same IPsec/IKE pre-shared keys for the Virtual Networks. This can be done via the Set-AzureVNetGatewayKey
    cmdlet in Azure PowerShell.
    However, when we use the Set-AzureVNetGatewayKey cmdlet in Azure PowerShell, we may receive the similar error below:

    Figure 1.Error message when using the Set-AzureVNetGatewayKey cmdlet in Azure PowerShell

    Cause:
    As the error message said, the Set-AzureVNetGatewayKey cmdlet is not recognized by the old versions of Azure PowerShell since it is a new cmdlet.

    Solution:
    Install the latest version of Azure PowerShell.
    You can install the latest version of Azure PowerShell from the link below:
    http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/
    In addition, you can check the current version of Azure PowerShell on your local computer by running the commands below:
    (Get-Module Azure).version
    or
    Get-Module (It displays
    the versions of all the module in your Azure PowerShell environment)

    From the figure below, you can see that the version of Azure PowerShell is 0.8.7.

    Figure 2. Check the version of Azure PowerShell

    After installing the latest version of Azure PowerShell on your local computer, you can run the Set-AzureVNetGatewayKey cmdlet successfully.
    From figure 3, we can see that no error message displayed any more.

    Figure 3. Run the Set-AzureVNetGatewayKey cmdlet successfully in Azure PowerShell

    More information:
    Configure a VNet to VNet Connection
    http://msdn.microsoft.com/en-us/library/azure/dn690122.aspx

    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    DB:3.57:[Forum Faq] Using Set-Azurevnetgatewaykey Cmdlet In Azure Powershell z9

    Symptom:
    When we create a VNet-to-VNet connection in Azure, the last step is to set the same IPsec/IKE pre-shared keys for the Virtual Networks. This can be done via the Set-AzureVNetGatewayKey
    cmdlet in Azure PowerShell.
    However, when we use the Set-AzureVNetGatewayKey cmdlet in Azure PowerShell, we may receive the similar error below:

    Figure 1.Error message when using the Set-AzureVNetGatewayKey cmdlet in Azure PowerShell

    Cause:
    As the error message said, the Set-AzureVNetGatewayKey cmdlet is not recognized by the old versions of Azure PowerShell since it is a new cmdlet.

    Solution:
    Install the latest version of Azure PowerShell.
    You can install the latest version of Azure PowerShell from the link below:
    http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/
    In addition, you can check the current version of Azure PowerShell on your local computer by running the commands below:
    (Get-Module Azure).version
    or
    Get-Module (It displays
    the versions of all the module in your Azure PowerShell environment)

    From the figure below, you can see that the version of Azure PowerShell is 0.8.7.

    Figure 2. Check the version of Azure PowerShell

    After installing the latest version of Azure PowerShell on your local computer, you can run the Set-AzureVNetGatewayKey cmdlet successfully.
    From figure 3, we can see that no error message displayed any more.

    Figure 3. Run the Set-AzureVNetGatewayKey cmdlet successfully in Azure PowerShell

    More information:
    Configure a VNet to VNet Connection
    http://msdn.microsoft.com/en-us/library/azure/dn690122.aspx

    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • RELEVANCY SCORE 3.56

    DB:3.56:Windows 8 Enterprise Powershell Error When Performed Batch Create zs




    Dear admin,

    I fresh installed a Win 8 Enterprise, installed Win Azure AD Module for Win Powershell and running a working script and received the error as below.

    A variable that cannot be referenced in restricted language mode or a Data
    section is being referenced. Variables that can be referenced include the
    following: $PSCulture, $PSUICulture, $true, $false, and $null.
    CategoryInfo : InvalidOperation: (:) [], RuntimeException
    FullyQualifiedErrorId : VariableReferenceNotSupportedInDataSection
    PSComputerName : pod51053psh.outlook.com

    The script is a running script on Win 7 currently without any error. This script is to batch create user in Office 365.

    Thanks.

    DB:3.56:Windows 8 Enterprise Powershell Error When Performed Batch Create zs

    What does your script do?
    Do you think you can post a snippet of the code that causes the error?

  • RELEVANCY SCORE 3.54

    DB:3.54:Running .Ps1 On Office 0365 f7


    Hi Team
    Recently one of customers moved to office 365 from exchange 2007 , and we connecting the powershell via windows azure active directory module for windows power shell and from there, we connecting exchange powershell to manage the exchange environment 2013
    my doubt is can we run .ps1 script from cloud ? or do i need to run the .ps1 from the physical server ?

    DB:3.54:Running .Ps1 On Office 0365 f7

    The script runs on your local machine and commands are proxied to EO servers. You cannot run a script against the server, the LanguageMode of the session is set to NoLanguage. You can read more about language modes here:
    http://technet.microsoft.com/en-us/library/dn433292.aspx
    What are you trying to achieve with the script?

  • RELEVANCY SCORE 3.51

    DB:3.51:Run Dpm Powershell Script Activity In Orchestrator 2012 Cannot Connect To Dpm Services With A Dpm Database On Remote Sql Server mm


    Hi there,
    i have not been able to get run DPM powershell script to successfully execute on my orchestratorrunbook server
    i am running DPM 2012 SP1 and Orchestrator 2012 R2. The DPM database resides on a remote SQL server.
    My testing reveals that evenjust a simple get-protectiongroup command fails with the SQL server logging an event that access was denied to ANONYMOUS LOGON
    It seems that the reason the run DPM powershell script activity doesn't work is because it is missing authentication by CredSSP
    My workaround is to NOT use run DPM powershell script activity but to install the powershell integration pack and run the scripts using CredSSP authentication type and a simple import-module dataprotectionmanager
    my question is whether the activity run DPM powershell script is meant to work with DPMwithDatabase on remote SQL servers? and if there will be a version of run DPM powershell script where CredSSP is a selectable authentication type?
    Cheers,

    DB:3.51:Run Dpm Powershell Script Activity In Orchestrator 2012 Cannot Connect To Dpm Services With A Dpm Database On Remote Sql Server mm

    Hi there,
    i have not been able to get run DPM powershell script to successfully execute on my orchestratorrunbook server
    i am running DPM 2012 SP1 and Orchestrator 2012 R2. The DPM database resides on a remote SQL server.
    My testing reveals that evenjust a simple get-protectiongroup command fails with the SQL server logging an event that access was denied to ANONYMOUS LOGON
    It seems that the reason the run DPM powershell script activity doesn't work is because it is missing authentication by CredSSP
    My workaround is to NOT use run DPM powershell script activity but to install the powershell integration pack and run the scripts using CredSSP authentication type and a simple import-module dataprotectionmanager
    my question is whether the activity run DPM powershell script is meant to work with DPMwithDatabase on remote SQL servers? and if there will be a version of run DPM powershell script where CredSSP is a selectable authentication type?
    Cheers,

  • RELEVANCY SCORE 3.45

    DB:3.45:Checking User Privilages Of Account Running Script 38



    I have a powershell script that occasionally fails on systems that aren't running it with the correct account.
    What I want to do is put a check at the beginning of the script to check that the user running the script has admin rights.
    In Linux bash scripts I'd use something like this:

    if [ $(id -u) != 0 ]; then

    I've run a few internet searches but I've not been able to find anything...
    What is the powershell equivelant to this?
    any help would be much appreciated

    DB:3.45:Checking User Privilages Of Account Running Script 38


    Try this
    snip
    Use the 'Insert Code Block' feature of the editor to post code.
    Especially if you're going to self-propose.Don't retire TechNet! -

    (Don't give up yet - 12,575 strong and growing)

  • RELEVANCY SCORE 3.41

    DB:3.41:Why Add-Azureaccount Gives No Credentials For Get-Azureresourcegroupgallerytemplate? c3


    I am currently testing out Azure Resource Manager with PowerShell. I am following the tutorial on the Azure website

    http://azure.microsoft.com/en-us/documentation/articles/powershell-azure-resource-manager/
    Intially, I run the instructions, as indicated in all tutorials to interact with Azure.
    Switch-AzureMode -Name AzureResourceManager
    Add-AzureAccount (which prompts to log-into Live ...username, password)
    Then I run
    Get-AzureResourceGroupGalleryTemplate
    To get this error message
    Get-AzureResourceGroupGalleryTemplate : Your Azure credentials have not been set up or have expired, please run

    Add-AzureAccount to set up your Azure credentials.
    At line:1 char:1
    Get-AzureResourceGroupGalleryTemplate
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo : CloseError: (:) [Get-AzureResourceGroupGalleryTemplate], ArgumentException
    FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Templates.GetAzureResourceGroupGalleryTemplateComma

    nd
    Based on all Azure literature, this error message should not happen. Why? What's the problem? Is there something I am not doing?

    Colbert

    DB:3.41:Why Add-Azureaccount Gives No Credentials For Get-Azureresourcegroupgallerytemplate? c3

    for being able to do that you need to sign with an organizational/AAD credential instead of a Microsoft Account credential.

  • RELEVANCY SCORE 3.41

    DB:3.41:Powershell Security pm


    I'm not sure if I'm posting in the correct forum or not, but I have created a powershell script that runs fine on Windows 7. The script executes an application. I am trying to implement it on Windows 8.1, 64 bit home edition.

    My Windows user account has Administrator rights. I have changed the execution policy to remotesigned, logged in as my Windows user account. When I execute the powershell script through the powershell command line, running as administrator, the script works
    and executes the application. All is good. When I double click the powershell script, it tries to run but errs, stating that the execution policy does not allow the execution of the script (Windows Defender is off). What do I have to do, to make the script
    run as me, even though i've already set the execution policy as remotesigned?
    Thanks,
    man da bull

    DB:3.41:Powershell Security pm

    I'm not sure if I'm posting in the correct forum or not, but I have created a powershell script that runs fine on Windows 7. The script executes an application. I am trying to implement it on Windows 8.1, 64 bit home edition.

    My Windows user account has Administrator rights. I have changed the execution policy to remotesigned, logged in as my Windows user account. When I execute the powershell script through the powershell command line, running as administrator, the script works
    and executes the application. All is good. When I double click the powershell script, it tries to run but errs, stating that the execution policy does not allow the execution of the script (Windows Defender is off). What do I have to do, to make the script
    run as me, even though i've already set the execution policy as remotesigned?
    Thanks,
    man da bull

  • RELEVANCY SCORE 3.37

    DB:3.37:Run Sql Azure Powershell Script In Query Editor 91


    I have to run SQL Azure Powershell script in SQL Azure query editor. I have done run Windows Powershell script in SQL server(Express edition) query editor of my system as

    xp_cmdshell 'sqlps -command $http=New-Object system.Net.WebClient;$http.downloadString(\url\)'

    It was successfully called the application by the url. But when I try to use same concept in SQL Azure, I come to know there is SQL Azure Powershell. From this poweshell I can call the application by url, for that I need to open SQL Azure Powershell and write
    the command, I Don't want to do in this way. I want to do the way I did in SQL server that write the query to run the Powershell script, I searched a lot but I don't find how to run the SQL Azure Powershell script in SQL Azure query editor Since It doesn't
    support the xp_cmdshell.

    can any one help me to solve this problem or refer me link where I can find material about SQL Azure Powershell

    DB:3.37:Run Sql Azure Powershell Script In Query Editor 91

    Sorry, but your question is not really clear to me.
    I was able to use the SQL Azure Power Shell by following this tutorial:
    http://blogs.msdn.com/b/windowsazure/archive/2013/02/07/windows-azure-sql-database-management-with-powershell.aspx

    Hope this can help.

  • RELEVANCY SCORE 3.34

    DB:3.34:Cant Use Punycode Domain On Azure Website. Getting 404 Not Found. x8


    I attached punycode domain to azure website using powershell (Set-AzureWebsite).
    Domain isshown is azure output of Get-AzureWebsite and in Azure portal.
    But when I try to access website using domain, I'm getting 404 NotFound azure page.
    When I go to azurewebsites.net domain, I see default website page (OK).

    DB:3.34:Cant Use Punycode Domain On Azure Website. Getting 404 Not Found. x8

    I attached punycode domain to azure website using powershell (Set-AzureWebsite).
    Domain isshown is azure output of Get-AzureWebsite and in Azure portal.
    But when I try to access website using domain, I'm getting 404 NotFound azure page.
    When I go to azurewebsites.net domain, I see default website page (OK).

  • RELEVANCY SCORE 3.29

    DB:3.29:Azure Powershell - Outofmemory Exception While Trying To Get All Blobs In A Container (Count915,000) c8


    Hi!!
    Trying to get the total size of a container using powershell azure commandlets. The container has more than 910,000 blobs, this is the point where it throw the exception, different attempts have gone to 915k blobs. The script runs for about
    2hrs before it breaks. Currently using powershell 3.0 with latest version of azure commands (uses the 2.4 Azure SDK) VM is a quadcore 7Gb of ram.
    I have also modified the maxram for powershell:
    Microsoft.WSMan.Management\WSMan::localhost\Plugin\microsoft.powershell\Quotas\MaxMemoryPerShellMB = 4096
    WSMan:\localhost\Shell\MaxMemoryPerShellMB =4094
    VM memory consumption goes from start at 1.7Gb used to a max of2.78Gb used and stays between 2.6 to 2.7 while running the script.
    script:
    $storageAccount = Get-AzureStorageAccount -StorageAccountName $StorageAccountName -ErrorAction SilentlyContinue
    if ($storageAccount -eq $null)
    {
    throw The storage account specified does not exist in this subscription.
    }

    # Instantiate a storage context for the storage account.
    $storagePrimaryKey = (Get-AzureStorageKey -StorageAccountName $StorageAccountName).Primary
    $storageContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $storagePrimaryKey
    # Attempt 1:Export all to csv later sum lengths

    Get-AzureStorageBlob -Context $storageContext -Container $ContainerName -ServerTimeoutPerRequest 2147483647 | Export-Csv c:\scripts\blobs.csv
    #
    $containerSizeInBytes =0
    $blobCount = 0
    Get-AzureStorageBlob -Context $storageContext -Container $Container.Name -ServerTimeoutPerRequest 2147483647 |

    ForEach-Object {
    $containerSizeInBytes = $_.Length
    $blobCount
    }
    Write-Output (Total size calculated is {1:F2}GB. -f ($containerSizeInBytes/1Gb) )

    DB:3.29:Azure Powershell - Outofmemory Exception While Trying To Get All Blobs In A Container (Count915,000) c8

    Hi!!
    Trying to get the total size of a container using powershell azure commandlets. The container has more than 910,000 blobs, this is the point where it throw the exception, different attempts have gone to 915k blobs. The script runs for about
    2hrs before it breaks. Currently using powershell 3.0 with latest version of azure commands (uses the 2.4 Azure SDK) VM is a quadcore 7Gb of ram.
    I have also modified the maxram for powershell:
    Microsoft.WSMan.Management\WSMan::localhost\Plugin\microsoft.powershell\Quotas\MaxMemoryPerShellMB = 4096
    WSMan:\localhost\Shell\MaxMemoryPerShellMB =4094
    VM memory consumption goes from start at 1.7Gb used to a max of2.78Gb used and stays between 2.6 to 2.7 while running the script.
    script:
    $storageAccount = Get-AzureStorageAccount -StorageAccountName $StorageAccountName -ErrorAction SilentlyContinue
    if ($storageAccount -eq $null)
    {
    throw The storage account specified does not exist in this subscription.
    }

    # Instantiate a storage context for the storage account.
    $storagePrimaryKey = (Get-AzureStorageKey -StorageAccountName $StorageAccountName).Primary
    $storageContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $storagePrimaryKey
    # Attempt 1:Export all to csv later sum lengths

    Get-AzureStorageBlob -Context $storageContext -Container $ContainerName -ServerTimeoutPerRequest 2147483647 | Export-Csv c:\scripts\blobs.csv
    #
    $containerSizeInBytes =0
    $blobCount = 0
    Get-AzureStorageBlob -Context $storageContext -Container $Container.Name -ServerTimeoutPerRequest 2147483647 |

    ForEach-Object {
    $containerSizeInBytes = $_.Length
    $blobCount
    }
    Write-Output (Total size calculated is {1:F2}GB. -f ($containerSizeInBytes/1Gb) )

  • RELEVANCY SCORE 3.28

    DB:3.28:The X-Ms-Requestid Did Not Complete After 1200 Seconds. sm


    Hi Guys,
    I have a cloud service which is running in windows azure and a solution on TFS on premise. I am trying to deploy my cloud service (containing a Web role and a Worker role) in Windows Azure using Powershell scripts so as to have CI and CD process up and running.
    During the Upgrade process in Powershell script I usually keep getting an error message of :-
    Set-AzureDeployment : The x-ms-requestid a3be1e68-d7c7-2a7d-815e-a81bbc95554e
    did not complete after 1200 seconds.
    At {FolderLocation}\PublishCloudService.ps1:81 char:22
    $setdeployment = Set-AzureDeployment -Upgrade -Slot $slot -Package
    $packageL ...
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~
    CategoryInfo : CloseError: (:) [Set-AzureDeployment], TimeoutEx
    ception
    FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagem
    ent.HostedServices.SetAzureDeploymentCommand

    I am not sure how can I fix the time duration for the Upgrade process usingSet-AzureDeployment cmdlet. I suspect that the time request issue is due to the fact that, my package file is roughly around 20 mb and its time to upload the file. I did try
    the solution mentioned
    herebut it did not help me much.
    Do you guys have any idea how can I fix this issue?

    Gaurav

    DB:3.28:The X-Ms-Requestid Did Not Complete After 1200 Seconds. sm

    If the package is large, you can try to upload it to blob storage first. You may not be able to use PowerShell to upload it, but you can write a simple program to do the job. I think you already know how to work with blob storage programmatically. You
    can call your program from a PowerShell script to provide automation. When calling Set-AzureDeployment, you can pass the blob's URL as the Package parameter. As long as the blob storage account is in the same subscription as your cloud service, it would work
    fine. But 1200 seconds is too long. Unless you network is extremely slow, it should not take 20 minutes to upload a 20 MB package. However, if your solution is complex, it may indeed take longer than 20 minutes to upgrade.

  • RELEVANCY SCORE 3.25

    DB:3.25:Powershell Azure Cmdlet Error 8a



    I'm having trouble with a Run .Net Script activity in a runbook I'm creating.
    The runbook is supposed to create an Azure Affinitygroup, then an Azure Cloudservice etc.
    This Run.Net Script is checking if there already is an Azure Affinity Group in the given Azure Subscription with a specific name. If not, it will create one.
    Problem is, it doesn't seem to be able to import the cmdlets properly into the runbook.
    I shortened the code just a bit to ease troubleshooting so it only imports the Azure module, then lists the cmdlets in it, see below:

    DB:3.25:Powershell Azure Cmdlet Error 8a

    I actually found the reason for this.
    Turns out that when Orchestrator is run on a 2008 R2 machine (or Win7 for that matter), Orchestrator chooses to run the code in Powershell 2.0, even when Powershell 3.0 is installed on the machine.
    As the Azure cmdlets requires Powershell 3.0, it fails.
    Added a line,
    $error|out-file c:\Azure
    Results\errorimport.txt
    right after the import-module and the resulting file showed something like this:

    Import-Module : The version of the loaded PowerShell is '2.0'. The module 'C:\Pr ogram Files (x86)\Microsoft SDKs\Windows
    Azure\PowerShell\Azure\Azure.psd1' requ
    ires a minimum PowerShell version of '3.0' to execute. Please verify the install
    ation of the PowerShell and try again.
    At line:1 char:14

    To workaround this, Powershell has the possibility to call another Powershell process as a subroutine, in which case it will actually run the subroutine in Powershell 3.0.

    $affinityExists = Powershell {
    Import-Module Azure
    Import-AzurePublishSettingsFile {AzurePublishSettingsFile}
    Select-AzureSubscription -SubscriptionName {AzureSubscription}
    $systemname = {Systemname from “Get Indata}
    $affinity = Get-AzureAffinityGroup -Name $systemname
    $test = select-string -InputObject $affinity.name -SimpleMatch $systemname
    if($test) {$affinityExists = True} else {$affinityExists = False}
    return $affinityExists
    }
    This will run the whole code within the Powershell{} context in Powershell 3.0.
    You have to return the variable $affinityExists at the last line to pass it back to the main Powershell process, because variables within the subroutines are only visible within it’s own context.

  • RELEVANCY SCORE 3.24

    DB:3.24:Powershell Sctript Base Monitoring With Certificate Authentication 31



    Hi All,
    i am working to create an PowerShell script to monitor azure environment, I have imported the azure module and PowerShell script works as desired and need to setup monitoring from multiple proxy
    agent.
    Issue: in script i am using certificate to authenticate the azure hosted service, for this i need to installcertificate
    onproxy which is not an best practice.
    PowerShell command:
    $cert = Get-Item cert:\CurrentUser\My\{Thumb print}
    i have importedcertificate in to the scom as binary authentication and password as basic authentication. Please let me know if there is an workaround to pass runas account certificate
    as parameter toscript, so that i can execute PowerShell commands for azure.
    Thanks

    sridhar v

    DB:3.24:Powershell Sctript Base Monitoring With Certificate Authentication 31

    Have you loaded the Azure MP and tried to monitor with the native MP?
    Download the MP athttp://www.microsoft.com/en-us/download/details.aspx?id=11324Pete Zerger, MVP, System Center Cloud & Datacenter | Twitter: @pzerger | http://www.systemcentercentral.com

  • RELEVANCY SCORE 3.24

    DB:3.24:Azure Password Synchronization Does Not Support Multiple Domain Controllers a1


    I have been receiving the following critical error message
    Action needed for Microsoft Azure Active Directory password synchronization
    Occurrences
    DC01 8/19/2014 2:08 AM
    Details
    The current configuration of Microsoft Azure Active Directory password synchronization does not support multiple domain controllers. A configuration update is needed to support multiple domain controllers.
    Resolution
    Open Windows Powershell with administrative privilege, and run the cmdlet Update-WssMsoPasswordSynchronzation.
    I have installed the Azure PowerShell Modules but when I try to run the Update-WssMsoPasswordSynchronzation I receive the following error:
    S C:\ Update-WssMsoPasswordSynchronzation
    Update-WssMsoPasswordSynchronzation : The term 'Update-WssMsoPasswordSynchronzation' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
    verify that the path is correct and try again.
    At line:1 char:1
    Update-WssMsoPasswordSynchronzation
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo : ObjectNotFound: (Update-WssMsoPasswordSynchronzation:String) [], CommandNotFoundExceptio
    n
    FullyQualifiedErrorId : CommandNotFoundException
    PS C:\
    I read about the Azure synch tool but not sure that well solve the problem. Besides I would like to understand why I am receiving the error when I run the command and what the possible solution are to this problem.
    This is a simple network:
    on premises server Windows Server 2012 Essentials R2
    have installed and configured the Office 365 Module to synch office 365accounts withmobile clients

    1) have on site back up 2) using Azure online backup as secondary back-up
    Godaddy account for custom domain for the Office 365 Account
    Azure AD Service to replicate Office 365 accounts with on premise WSE 2012
    Thank you for taking the time to read this and for providing feed back.
    Mark R Bracking

    Mark R Bracking

    DB:3.24:Azure Password Synchronization Does Not Support Multiple Domain Controllers a1

    I am having the same problem here. Have a simple AD deployment and started getting this error after adding a secondary DC to the domain. Trying to run the command gets the same error as original poster.
    We have Windows Server Essentials Experience installed on the primary DC for Office 365 integration. Was working fine until the second DC was added. Strangely even though it seems like the Essentials Experience uses something akin to 'DirSync Lite' the necessary
    commandlets are not available to fix the problem.
    Any ideas MS?

  • RELEVANCY SCORE 3.23

    DB:3.23:Powershell Cmdlets To Manage Azure Acs? mx


    Hello, I've been tasked with automating the deployment of Azure ACS and SBR. I'm not finding any PowerShell cmdlets for Azure ACS with the exception of a module that was published on CodePlex in 2011 that has since been removed.

    I'm assuming that since Microsoft is a cloud first software provider that there are PowerShell cmdlets which will allow me to administer Azure ACS? If so, where are they?

    DB:3.23:Powershell Cmdlets To Manage Azure Acs? mx

    There aren’t any official ACS powershell cmdlets anymore, the functionality of ACS is being moved to Azure AD.
    http://blogs.technet.com/b/ad/archive/2013/06/22/azure-active-directory-is-the-future-of-acs.aspx

  • RELEVANCY SCORE 3.21

    DB:3.21:Can Not Connect Remotely To Exchange Online Server From Azurewebsites And Webjobs Using Powershell Command New-Pssession js


    I tried to use powershell script and C# code:
    using (var ps = PowerShell.Create())
    {
    ps.AddScript(scriptText);
    ps.AddParameters(strArray);
    var result = ps.Invoke();
    }
    Running Powershell script using script file and cmd runner gives the same result.
    The problem part of powershell script is in:
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection;
    Import-PSSession $Session;

    We get the problem, logged in WebJob Run Details:
    New-PSSession : [outlook.office365.com] Connecting to remote server
    outlook.office365.com failed with the following error message : WS-Management
    cannot process the request. The operation failed because of an HTTP error. The
    HTTP error (50) is: The request is not supported. . For more information, see
    the about_Remote_Troubleshooting Help topic.
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange
    -ConnectionUri ht ...
    CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:Re
    moteRunspace) [New-PSSession], PSRemotingTransportException
    FullyQualifiedErrorId : WinRMOperationAborted,PSSessionOpenFailed
    Import-PSSession : Cannot validate argument on parameter 'Session'. The
    argument is null. Supply a non-null argument and try the command again.

    Local run works perfect, but I need the application to be hosted in azure. How can I solve this issue?

    DB:3.21:Can Not Connect Remotely To Exchange Online Server From Azurewebsites And Webjobs Using Powershell Command New-Pssession js

    I tried to use powershell script and C# code:
    using (var ps = PowerShell.Create())
    {
    ps.AddScript(scriptText);
    ps.AddParameters(strArray);
    var result = ps.Invoke();
    }
    Running Powershell script using script file and cmd runner gives the same result.
    The problem part of powershell script is in:
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection;
    Import-PSSession $Session;

    We get the problem, logged in WebJob Run Details:
    New-PSSession : [outlook.office365.com] Connecting to remote server
    outlook.office365.com failed with the following error message : WS-Management
    cannot process the request. The operation failed because of an HTTP error. The
    HTTP error (50) is: The request is not supported. . For more information, see
    the about_Remote_Troubleshooting Help topic.
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange
    -ConnectionUri ht ...
    CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:Re
    moteRunspace) [New-PSSession], PSRemotingTransportException
    FullyQualifiedErrorId : WinRMOperationAborted,PSSessionOpenFailed
    Import-PSSession : Cannot validate argument on parameter 'Session'. The
    argument is null. Supply a non-null argument and try the command again.

    Local run works perfect, but I need the application to be hosted in azure. How can I solve this issue?

  • RELEVANCY SCORE 3.18

    DB:3.18:What Are The Best Practices To Automate The Provisioning Of An Azure Website With Drupal ms


    We need a script that creates an Azure web site with Drupal using MySQL from scratch.
    Should I use PowerShell with any particular libraries? Or should I use Chef or Puppet? Is Chef and Puppet really only intended for Azure Virtual Machines?

    How much of the Drupal configuration can or should be automated on the Azure Web Site? Our experiments show that only read-only drush commands are available on Azure Web Site?
    thanks,
    Ray Pereda

    DB:3.18:What Are The Best Practices To Automate The Provisioning Of An Azure Website With Drupal ms

    Hi Ray Pereda,
    Thereseems to bea noway to dothis with our Powershell cmdlets. Youmay use cmdlet to create a site and then use msdeploy to deploy a website to that site, but that doesn’t address the MySQL database.
    I recommend you to continue with the management portal approach.
    Regards,
    Shirisha Paderu

  • RELEVANCY SCORE 3.18

    DB:3.18:Powershell Errors: The Winrm Client Cannot Process The Request Because The Server Name Cannot Be Found 89


    Hi,
    Please direct me to the right forum if this isn't correct.
    I have a Powershell script that connects to Azure and creates a new VM. This involves uploading some data files and subsequently configuring and starting services (sql, web-pools etc).
    Usually this runs fine. But 10% of the time (lastly more like 50%) I'm experiencing connection errors. In general I just re-try a couple of time which does the trick. But other times it fails completly leaving the VM unaccessible (RDP).
    The errors I get are:
    The WinRM client cannot process the request because the server name cannot be resolved.
    The server name however resolves fine to an IP address. And the Azure Management Portal shows the VM running fine. And also Azure status pages shows everything is running. But sometimes RDP can't connect to the server either. When that happens I stop the
    script, delete the VM and retries - usually that resolves the issue and the VM is up and running correct.
    So this is an intermediate error unfortunately. I'm at a loss on how to investigate this issue further. Until I discovered that I couldn't even use RDP towards the VM, I thought it might be more a PS issue than an Azure issue. But now I don't know.

    Any pointers more than welcome!
    Thanks.

    DB:3.18:Powershell Errors: The Winrm Client Cannot Process The Request Because The Server Name Cannot Be Found 89

    Hi,
    Are you hitting this error within the Azure Automation service, or from the Powershell ISE / PowerShell console?

  • RELEVANCY SCORE 3.17

    DB:3.17:Execute Windows Powershell Script, Adding A Script Argument js



    I need to pass one argument to my powershell script in Tidal Orchestrator.  c:\script.ps1 "argument". Argument is hidden string

    How should I enter an argument in the "Script Arguments" field?

    I tried a lot of combinations but nothing works. Tidal activity doesn't pass argument to powershell script at all.

    It only works if I pass it in "Script to execute on target" field. But it's not what I want. I can not pass hidden string in this field.

    Any suggestions are welcome.

    DB:3.17:Execute Windows Powershell Script, Adding A Script Argument js


    Thank everybody for your answers. I pasted content of the script in "Script to execute on target" field and it works now. It didn't work because I used windows path to PS1 file in this field.

  • RELEVANCY SCORE 3.17

    DB:3.17:Retrieve Virtual Machine State With Powershell 1s


    Hi there
    Is there any way to retrieve status of a virtual machine (running or stopped) using azure powershell?
    Thanks

    DB:3.17:Retrieve Virtual Machine State With Powershell 1s

    Thanks Sunny
    stupid mistake, I never tried Get-AzureVM alone without any parameter!!!

  • RELEVANCY SCORE 3.17

    DB:3.17:Module With .Net Assembiles - Null Exception 83


    Hi,
    I have created an powershell module to send/receive messages from Azure ServiceBus (link to
    repro). The module work just fine in powershell 3 4 locally. I have also tested it on powershell 4 using a workflow, no issues what so ever. When I try the same workflow on Azure automation, I receive
    a null exception object reference not set to an instance of an object.
    Looking into this, I noticed that the workflow is running on a host which have these .net versions (from the registry):
    PSChildName : Client
    Version : 4.5.51078
    PSComputerName : localhost
    PSSourceJobInstanceId : bace400a-ac6c-4d66-83c0-8a25175b3c52

    PSChildName : Full
    Version : 4.5.51078
    PSComputerName : localhost
    PSSourceJobInstanceId : bace400a-ac6c-4d66-83c0-8a25175b3c52

    PSChildName : Client
    Version : 4.0.0.0
    PSComputerName : localhost
    PSSourceJobInstanceId : bace400a-ac6c-4d66-83c0-8a25175b3c52
    It is my understanding that microsoft.servicebus.dll requires the full client to work (link). How come the .net 4.0 full profile is not installed on the worker nodes hosting Azure Automation?
    Will the .net 4.0 full version ever be available in Azure Automation? If not, how can we use Azure ServiceBus from Azure Automation?
    Any suggestions would be very welcome :-)
    Cheers
    Tore

    DB:3.17:Module With .Net Assembiles - Null Exception 83

    I also can't find the workflow you are trying to run via the link you provided. Where is it?
    In addition, looking at the PowerBus module via the link you provided, I noticed you dothe following:
    $Script:Assemblies = $psScriptRoot\bin\Powerbus.dll
    However, the bin directory in this module does not have that .DLL file:

    Could this be the cause of the issue?

  • RELEVANCY SCORE 3.17

    DB:3.17:Calling Powershell Script From C#. a1


    Hi Team,
    I am trying to call a powershell script from C#.
    The powershell script is working fine when we execute it at from command prompt.
    The script is having 3 user defined functions where in we are using many Azure cmdlets for the deployment.
    I am getting errors while executing it from C#.
    Can anyone please explain me what is the procedure of calling a powershell script ?
    Should we create Command Objects for each cmdlet and add it to the PipeLine.Commands list ?
    Or Is there anyway to hardcode this script in C# ( since it is working when we execute at the command prompt)
    I am getting the following error :
    Cannot invoke this function because the current host does not implement it.
    Can you please give some inputs on it to go ahead.
    Thanks,
    Srikrishna

    Srikrishna

    DB:3.17:Calling Powershell Script From C#. a1

    Hi Team,
    I am trying to call a powershell script from C#.
    The powershell script is working fine when we execute it at from command prompt.
    The script is having 3 user defined functions where in we are using many Azure cmdlets for the deployment.
    I am getting errors while executing it from C#.
    Can anyone please explain me what is the procedure of calling a powershell script ?
    Should we create Command Objects for each cmdlet and add it to the PipeLine.Commands list ?
    Or Is there anyway to hardcode this script in C# ( since it is working when we execute at the command prompt)
    I am getting the following error :
    Cannot invoke this function because the current host does not implement it.
    Can you please give some inputs on it to go ahead.
    Thanks,
    Srikrishna

    Srikrishna

  • RELEVANCY SCORE 3.16

    DB:3.16:Problem With Rdp To The Vm zc


    Hi,
    I am facing issue while i am trying to connect to the azure vitual machine. I am getting following error:

    Remote Desktop can’t connect to the remote computer for one of these reasons:

    1) Remote access to the server is not enabled

    2) The remote computer is turned off

    3) The remote computer is not available on the network

    Make sure the remote computer is turned on and connected to the network, and that remote access is enabled.

    About VM: The virtual machine is added to the virtual network. I am having some other machines on same VN, to which i am able to take RDP.

    What i tried till now:

    Reconfigured the Endpoint for RDP on azure portal.Verified that particular port is opened from my(local) machine.Restarted the azure VM(thinking that might be RDP service is not running on particular machine).Since this machine was on virtual network.So i created one more VM on the same nework.Then tried with Telnet command. ex. telnet 10.0.0.4(Internal
    Ip) 3389(RDP port) Failed. tried for powershell port also ex: telnet 10.0.0.4(Internal Ip) 5986(Powershell port).
    Now i can't start the RDP service on the VM(assuming RDP service is not running) through powershell because i am not able to access the machine through
    testvm(on same virtual network).
    Please let me know the fix for this issue.
    Regards,
    Avinash

    DB:3.16:Problem With Rdp To The Vm zc

    Tried my best but unable to resolve this issue. After some days i found that there was no connect button enabled from azure portal for that particular VM.I was not having any choice else deleting the VM.

  • RELEVANCY SCORE 3.16

    DB:3.16:Powershell Webjob Using Test-Connection Gives: Access Is Denied. (E_Accessdenied)) 8s


    I've written a PowerShell script which pings a server and then posts the ping result to another service I have running.
    The script runs fine on my local machine. I wanted to run it as a WebJob on Azure, so ziped the .ps1 file and configured it as a WebJob. When I run it and check the logs I see the following error message:
    Test-Connection : Access is denied. (Exception from HRESULT: 0x8007000586763d: ERR ] (E_ACCESSDENIED))
    The part of the script causing the error:
    $Server = www.mysite.comfunction getAvPing { # PowerShell Test-Connection to measure a server's response time $PingServer = Test-Connection $Server $Avg = ($PingServer | Measure-Object ResponseTime -average) return $Avg.average}...
    I've checked around Azure for some Permission settings but wasn't able to find any. Is it not possible to run a script like this?

    Thanks

    DB:3.16:Powershell Webjob Using Test-Connection Gives: Access Is Denied. (E_Accessdenied)) 8s

    hi,
    Wedon't change the Authentication permission if we use 'Test-Connection'on azure website. I am not sure you use which server on your local test. If you use azure cloud service, VM or website server, you didn't access into server because of load
    balancer. And I don't recommend you use like this script.
    Regards,
    WillWe are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click
    HERE to participate the survey.

  • RELEVANCY SCORE 3.15

    DB:3.15:Webjobs ff


    I created a new Webjob that would run on a schedule and initiate an existing powershell script. After reviewing the logs it seems the script is being ran and then encounters errors where the commands are not recognized. The first command is Select-AzureSubscription.
    Does Webjobs not utilize the Azure Powershell Commands? Any thoughts how I can get this to work correctly?

    Note that the script works just fine when running from a server via task scheduler.

    DB:3.15:Webjobs ff

    Using the -File parameter is only a factor when pulling the .ps1 file using the old way. Webjobs now supports .ps1 files and no longer requires that process.
    I spoke with the writer of that blog and he confirmed that Webjobs does not support the Azure commandlets being used within a .ps1 file.

  • RELEVANCY SCORE 3.15

    DB:3.15:Running Customdata Script In Azure Windows Vm z9


    Am sending a powershell script using CustomData parameter (HTTP) while creating a Windows VM. The content is found in AzureData folder of the VM , named CustomData.bin. How can i execute the CustomData? My powershell command is,

    powershell
    (New-Object System.Net.WebClient).DownloadString(https://URL to download .ps1) C:\provision.ps1
    Set-ExecutionPolicy Unrestricted -Force
    cd C:\
    .\provision.ps1
    /powershell

    I want this script to be executed once the VM is created. Could anyone please suggest how can i implement this?

    DB:3.15:Running Customdata Script In Azure Windows Vm z9

    Hi Marius,
    Thanks for your suggestion.I tried the approach mentioned by you.
    $context = Get-AzureVM -ServiceName June6 -Name June6
    Set-AzureVMCustomScriptExtension -VM $context.VM -FileUri 'location containing script' -Run 'test.ps1'

    Update-AzureVM -VM $context.VM -ServiceName June6 -Name June6
    But this didn't work. The concern i have here is, the parameter FileUri reads the script from a AWS S3 location - where i have my script uploaded. Is it possible to get the script downloaded from S3? Coz it was mentioned that the scripts should be uploaded
    to a Container in default account. But i dont want to upload the script to a Container account for a subscription and prefer to download and execute it from a S3 location of Amazon.
    Please let me know if this is possible and kindly suggest any workaround if any.

  • RELEVANCY SCORE 3.14

    DB:3.14:Azure Remoteapp Template Upload Succeeds Using Azure Powershell But Portal Shows Upload Failed pa


    Hi
    I followed the steps to create the template image without issues and successfully uploaded the image using the provided azure PowerShell script however the Azure portal shows that the upload failed. There is no error description provided in the portal so
    not sure what's goingwrong.
    PowerShell Results
    PS C:\temp .\Upload-AzureRemoteAppTemplateImage.ps1 -SAS ?sv=2012-02-12sr=bsi=4ebb0a07-e7d5-4689-9147-f177260eb1c4s
    ig=aO4oufDoDpIvS2kuLFUU%2B2EtXXv16wx%2F1VhtgswR1Yk%3D -URI https://cdvwe165201883rdcm.blob.core.windows.net/goldimages
    /4ebb0a07-e7d5-4689-9147-f177260eb1c4.vhd
    VERBOSE:
    VERBOSE: Mounting the VHD.
    VERBOSE:
    VERBOSE: Successfully mounted the VHD.
    VERBOSE: Number of volumes with Windows OS on it: 1
    VERBOSE: Successfully unloaded hive: HKLM:\vhd_sft from the VHD.
    VERBOSE: Successfully unloaded hive: HKLM:\vhd_sys from the VHD.
    VERBOSE: Successfully detached the VHD.
    Starting image upload.
    MD5 hash is being calculated for the file
    \\drsvr40\d$\Hyper-V\VHD\AZRRDSTMPLT.vhd.
    MD5 hash calculation is completed.
    Elapsed time for the operation: 00:42:13
    Creating new page blob of size 214748365312...
    Elapsed time for upload: 02:22:20
    LocalFilePath
    DestinationUri
    -------------
    --------------
    \\drsvr40\d$\Hyper-V\VHD\AZRRDSTMPLT.vhd
    https://cdvwe165201883rdcm.blob.core.windows.net/goldima...
    Successfully uploaded template image.

    Portal Error

    Any help would be greatly appreciated.

    TurboUK

    DB:3.14:Azure Remoteapp Template Upload Succeeds Using Azure Powershell But Portal Shows Upload Failed pa

    I'm OK now thanks - I recreated the template image. The only thing I did differently was to reboot the server after disabling EFS, and then performing sysprep.

  • RELEVANCY SCORE 3.11

    DB:3.11:Running Hive Queries Using The .Net Sdk j8


    Azure PowerShell has an Invoke-hive command that can use a -File parameter to execute an .hql script from an Azure Storage Blob. My question is simple, is there a method of doing this from c#? And if so, can it return an answer set that may be accessed with
    the foreach statement?
    Bill

    Bill McCann CTO AlignCare Services, LLC

    DB:3.11:Running Hive Queries Using The .Net Sdk j8

    I'm writing this reply on the off chance that someone else is struggling with the HDInsight SDK too. It's a tricky service to troubleshoot and there is very little information online. The word sample is silly and next to useless. But when things work, they
    rock!
    The responses from Jonathan Gao above do describe the solution to my original question. A couple things to be aware of. In step 10. of the documentation at

    http://www.windowsazure.com/en-us/documentation/articles/hdinsight-submit-hadoop-jobs-programmatically/#hive-sdk three variables are set. The first is the Azuresubscription id associated with the HDInsight cluster where you wish to run the job. Silly
    me, I confused this with the subscription name (that you need in other situations). You can get the subscription id in a few ways but I copied it off the dashboard page of my cluster on the Azure Management Portal (it's on the lower right side of the page).
    The second variable is the cluster name. I feel like an idiot admitting this, but this item caused my problem above and had me stumped for days. In this case, the cluster name is only that, the name of the cluster. I made the mistake of using the full URL
    to the cluster (as needed when using the MapReduce SDK). In short...
    Good: myclustername
    Bad: https://myclustername.azurehdinsight.net:443

    https://presciencerxdev.azurehdinsight.net:443

    Bill McCann CTO AlignCare Services, LLC

  • RELEVANCY SCORE 3.10

    DB:3.10:Run .Net Script As Powershell V2 64bit pp


    Hi,
    Is there a way to run a script with Run .NET Script activity as powershell v2 64bit, given that powershell v3 is installed on the runbook server?
    Running this
    $result = powershell { $psversiontable.psversion.tostring }
    Will return 3.0 as expected when you use the powershell in powershell trick to run 64bit powershell.

    But running this
    $result = PowerShell.exe -Version 2 { $psversiontable.psversion.tostring() }
    Will return an empty result (and any real script won't run), even though this works perfectly fine when ran manually in a real shell.
    Also, using Invoke-Command is not an option in my case (long story short, I'm trying to orchestrate some Exchange scripts; more here :https://social.technet.microsoft.com/Forums/exchange/en-US/4ecf5b75-8755-4b4c-a809-f30e5c5c718d/remotely-run-startstopdagservermaintenance-scripts?forum=exchange2010
    )

    Any idea?
    Thanks!

    DB:3.10:Run .Net Script As Powershell V2 64bit pp

    Sorry,
    yes, in PS console PowerShell.exe -Version 2 { $psversiontable.psversion.tostring() } works. I got the error from my first reply in PowerShell ISE.
    Sorry again,
    Stefan

    www.sc-orchestrator.eu ,
    Blog sc-orchestrator.eu

  • RELEVANCY SCORE 3.09

    DB:3.09:[Forum Faq] Using Windows Azure Powershell To Operate Microsoft Azure Virtual Machines 39



    Since Windows Azure PowerShell is a powerful tool that we can use to control the deployment and management our workloads in Windows Azure, in this article, we will introduce some basic configurations for Azure Virtual Machines via Windows Azure PowerShell.

    To use Windows Azure PowerShell, we need to download and install Azure PowerShell module by running the Microsoft Web Platform Installer. Then, we can run Windows Azure PowerShell and connect to our subscription.

    Here are some common operation tasks:

    1. Create a Virtual network

    If we already have created a virtual network in Windows Azure, we can edit the .netcfg file to create a new virtual network. Firstly, we can use Get-azureVnetConfig to retrieve the configuration file to a local file. (Figure 1)

    Figure 1. Retrieve the virtual network configuration file via Windows Azure PowerShell

    After that, we can add the following commands in Mynetwork.netcfg file and save it.

    /VirtualNetworkSite
    VirtualNetworkSite name=test01 Location=West US
    AddressSpace
    AddressPrefix10.0.0.0/8/AddressPrefix
    /AddressSpace
    Subnets
    Subnet name=Subnet-1
    AddressPrefix10.0.0.0/24/AddressPrefix
    /Subnet
    Subnet name=Subnet-2
    AddressPrefix10.0.1.0/24/AddressPrefix
    /Subnet
    /Subnets

    Note: In general, when we create a Virtual network, we need to choose an Affinity Group instead of a region. However, when we configure the .netcfg file, we can define a region for the virtual network by writing VirtualNetworkSite name=xxx Location=xxx
    instead of VirtualNetworkSite name=xxx AffinityGroup=xxx .

    Then, we can use Set-AzureVNetConfig commands to reconfigure our virtual networks. (Figure 2)

    Figure 2. Reconfigure virtual network configuration file via Windows Azure PowerShell

    2. Create a new Cloud Service

    We can use new-azureservice to create Cloud Service. (Figure 3)

    Figure 3. Create a new Cloud Service via Windows Azure PowerShell

    3. Create a Windows Azure Virtual Machine in the existing Virtual Network and Cloud Service

    To create an Azure Virtual Machine, we can use an image from the gallery or our own image/disk. In this example, we use a windows server 2008 r2 image from the gallery. Firstly, we run “Get-AzureVMimage|Select ImageName” cmdlet to obtain the image name of the
    image that we want to use.

    Then we run the commands in the figure 4:

    Figure 4. Create a new virtual network via Windows Azure PowerShell

    After that, we can obtain the detailed information of the Virtual Machine by using the Get-AzureVM cmdlets. (Figure 5)

    Figure 5. Get the information of a Virtual Machine via Windows Azure PowerShell

    4. Add an endpoint for Virtual Machine

    To create an endpoint for an Azure Virtual Machine, we can use Get-AzureVM and Add-AzureEndpoint cmdlets, and Update-AzureVM to update the configuration for the Virtual Machine. (Figure 6)

    Figure 6. Create an endpoint via Windows Azure PowerShell

    5. Start/stop an Azure Virtual Machine

    We can use Start-AzureVM and Stop-AzureVM
    cmdlets to start or shut down an Azure
    Virtual Machine. (Figure 7)

    Figure 7. Start an Azure Virtual Machine via Windows Azure PowerShell

    When we shut down an Azure Virtual Machine via Windows Azure PowerShell, we need to notice that if we use
    theStop-AzureVM cmdlet without the -StayProvisioned parameter, then the Virtual Machine will be shut down to the status of Stopped (Deallocated) and you won’t be charged for the Virtual Machine.

    However, Windows Azure resourcesand theIP address associated with that
    Virtual Machine will be released. We can see the differences below:

    When we theStop-AzureVM cmdlet with the -StayProvisioned parameter to shut down the Virtual Machine (Figure 8), we can see the
    Virtual Machine is in the stopped status from windows Azure management portal. (Figure 9)

    Figure 8. Shut down an Azure Virtual Machine to the stopped status via Windows Azure PowerShell

    Figure 9. Virtual Machine’s status in Windows Management portal

    In addition, we can see the Virtual Machine is in the stopped (Deallocated) status (Figure 10) after running Stop-AzureVM without –StayProvisioned
    parameter. If it is the unique Virtual Machine in the cloud service, it will prompt that the public IP address for your cloud service would
    be changed. (Figure 11)

    Figure 10. Virtual Machine’s status in Windows Management portal

    Figure 11. Shut down an Azure Virtual Machine
    to the stopped (deallocated) status via Windows Azure PowerShell

    6. Create an Availability Set

    To create an availability set, we can specify it by add –AvailabilitySetName parameter inNew-AzureVMConfig cmdlets. Since we have created the
    Virtual Machine, we use the Cmdlets in Figure 12 to add the
    Virtual Machine to a new Availability Set and this will cause the
    Virtual Machine reboot.

    Figure 12. Create an Availability Set via Windows Azure PowerShell

    Then we can check in the virtual machine management portal, the Virtual Machine is added to the
    Availability Set test123. (Figure 13)

    Figure 13. Configure panel of the Azure Virtual Machine Management Portal

    7. Delete an Azure Virtual Machine

    In general, we use the Remove-AzureVM cmdlet to delete a Windows Azure Virtual Machine and it
    does not remove the VHD for the Virtual Machine. In addition, we can add –deletevhd parameter to delete the VHD.(Figure
    14)

    Figure 14. Delete an Azure Virtual Machine via Windows Azure PowerShell

    More information:

    Create or Delete Virtual Machines Using Windows Azure Cmdlets

    http://msdn.microsoft.com/en-us/library/jj835085.aspx

    Azure Service Management Cmdlets

    http://msdn.microsoft.com/en-us/library/dn495240.aspx

    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    DB:3.09:[Forum Faq] Using Windows Azure Powershell To Operate Microsoft Azure Virtual Machines 39


    Since Windows Azure PowerShell is a powerful tool that we can use to control the deployment and management our workloads in Windows Azure, in this article, we will introduce some basic configurations for Azure Virtual Machines via Windows Azure PowerShell.

    To use Windows Azure PowerShell, we need to download and install Azure PowerShell module by running the Microsoft Web Platform Installer. Then, we can run Windows Azure PowerShell and connect to our subscription.

    Here are some common operation tasks:

    1. Create a Virtual network

    If we already have created a virtual network in Windows Azure, we can edit the .netcfg file to create a new virtual network. Firstly, we can use Get-azureVnetConfig to retrieve the configuration file to a local file. (Figure 1)

    Figure 1. Retrieve the virtual network configuration file via Windows Azure PowerShell

    After that, we can add the following commands in Mynetwork.netcfg file and save it.

    /VirtualNetworkSite
    VirtualNetworkSite name=test01 Location=West US
    AddressSpace
    AddressPrefix10.0.0.0/8/AddressPrefix
    /AddressSpace
    Subnets
    Subnet name=Subnet-1
    AddressPrefix10.0.0.0/24/AddressPrefix
    /Subnet
    Subnet name=Subnet-2
    AddressPrefix10.0.1.0/24/AddressPrefix
    /Subnet
    /Subnets

    Note: In general, when we create a Virtual network, we need to choose an Affinity Group instead of a region. However, when we configure the .netcfg file, we can define a region for the virtual network by writing VirtualNetworkSite name=xxx Location=xxx
    instead of VirtualNetworkSite name=xxx AffinityGroup=xxx .

    Then, we can use Set-AzureVNetConfig commands to reconfigure our virtual networks. (Figure 2)

    Figure 2. Reconfigure virtual network configuration file via Windows Azure PowerShell

    2. Create a new Cloud Service

    We can use new-azureservice to create Cloud Service. (Figure 3)

    Figure 3. Create a new Cloud Service via Windows Azure PowerShell

    3. Create a Windows Azure Virtual Machine in the existing Virtual Network and Cloud Service

    To create an Azure Virtual Machine, we can use an image from the gallery or our own image/disk. In this example, we use a windows server 2008 r2 image from the gallery. Firstly, we run “Get-AzureVMimage|Select ImageName” cmdlet to obtain the image name of the
    image that we want to use.

    Then we run the commands in the figure 4:

    Figure 4. Create a new virtual network via Windows Azure PowerShell

    After that, we can obtain the detailed information of the Virtual Machine by using the Get-AzureVM cmdlets. (Figure 5)

    Figure 5. Get the information of a Virtual Machine via Windows Azure PowerShell

    4. Add an endpoint for Virtual Machine

    To create an endpoint for an Azure Virtual Machine, we can use Get-AzureVM and Add-AzureEndpoint cmdlets, and Update-AzureVM to update the configuration for the Virtual Machine. (Figure 6)

    Figure 6. Create an endpoint via Windows Azure PowerShell

    5. Start/stop an Azure Virtual Machine

    We can use Start-AzureVM and Stop-AzureVM
    cmdlets to start or shut down an Azure
    Virtual Machine. (Figure 7)

    Figure 7. Start an Azure Virtual Machine via Windows Azure PowerShell

    When we shut down an Azure Virtual Machine via Windows Azure PowerShell, we need to notice that if we use
    theStop-AzureVM cmdlet without the -StayProvisioned parameter, then the Virtual Machine will be shut down to the status of Stopped (Deallocated) and you won’t be charged for the Virtual Machine.

    However, Windows Azure resourcesand theIP address associated with that
    Virtual Machine will be released. We can see the differences below:

    When we theStop-AzureVM cmdlet with the -StayProvisioned parameter to shut down the Virtual Machine (Figure 8), we can see the
    Virtual Machine is in the stopped status from windows Azure management portal. (Figure 9)

    Figure 8. Shut down an Azure Virtual Machine to the stopped status via Windows Azure PowerShell

    Figure 9. Virtual Machine’s status in Windows Management portal

    In addition, we can see the Virtual Machine is in the stopped (Deallocated) status (Figure 10) after running Stop-AzureVM without –StayProvisioned
    parameter. If it is the unique Virtual Machine in the cloud service, it will prompt that the public IP address for your cloud service would
    be changed. (Figure 11)

    Figure 10. Virtual Machine’s status in Windows Management portal

    Figure 11. Shut down an Azure Virtual Machine
    to the stopped (deallocated) status via Windows Azure PowerShell

    6. Create an Availability Set

    To create an availability set, we can specify it by add –AvailabilitySetName parameter inNew-AzureVMConfig cmdlets. Since we have created the
    Virtual Machine, we use the Cmdlets in Figure 12 to add the
    Virtual Machine to a new Availability Set and this will cause the
    Virtual Machine reboot.

    Figure 12. Create an Availability Set via Windows Azure PowerShell

    Then we can check in the virtual machine management portal, the Virtual Machine is added to the
    Availability Set test123. (Figure 13)

    Figure 13. Configure panel of the Azure Virtual Machine Management Portal

    7. Delete an Azure Virtual Machine

    In general, we use the Remove-AzureVM cmdlet to delete a Windows Azure Virtual Machine and it
    does not remove the VHD for the Virtual Machine. In addition, we can add –deletevhd parameter to delete the VHD.(Figure
    14)

    Figure 14. Delete an Azure Virtual Machine via Windows Azure PowerShell

    More information:

    Create or Delete Virtual Machines Using Windows Azure Cmdlets

    http://msdn.microsoft.com/en-us/library/jj835085.aspx

    Azure Service Management Cmdlets

    http://msdn.microsoft.com/en-us/library/dn495240.aspx

    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • RELEVANCY SCORE 3.09

    DB:3.09:Start-Azurestorageblobcopy Command Errors With Missing Dll 9f


    Running the latest version of the Azure Powershell commands. When attempting to run the script similar to what is found here -http://michaelwasham.com/windows-azure-powershell-reference-guide/copying-vhds-blobs-between-storage-accounts/, I get the
    following error:
    Could not load file or assembly 'Microsoft.WindowsAzure.Storage.DataMovement, Version=2.2.1.0, Culture=neutral,
    PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
    This DLL was part of the AZCopy utility DLL set. It's apparently missing from the Azure Powershell cmdlets when they get installed.
    Any help is appreciated..

    DB:3.09:Start-Azurestorageblobcopy Command Errors With Missing Dll 9f

    The cache referred to here is the Web Platform installer cache.Remove theAzure Powershell Cmdlets. Then follow the steps here -

    http://www.sidesofmarch.com/index.php/archive/2013/07/25/clearing-the-web-platform-installers-installer-cache/

    Then reinstall the Azure PS Cmdlets and it should be fine.

  • RELEVANCY SCORE 3.08

    DB:3.08:Is Powershell 3.0 Supported ? 3z



    Hi

    We need to Invoke PowerShell on an Azure Machine configured as MID Server, having PowerShell 3.0 or higher.

    Even though we can activate PowerShell 2.0 feature in Azure Machine, we have specific requirement to use PowerShell 3.0 ( for SharePoint Online PowerShell)

    Has anyone tried using 3.0 ? I mean more than just basic connection or authentication

    Your response will be highly appreciated.

    DB:3.08:Is Powershell 3.0 Supported ? 3z


    Hey Ben, Thanks a lot for your quick response here.

    Can you please take a look on this one?

    Authentication Failure while trying to invoke PowerShell on MID Server

  • RELEVANCY SCORE 3.08

    DB:3.08:Power Shell Not Recognizing The Azure Subscription After 12 Hours fd


    Dear Friends,
    I have configured Windows Azure PowerShell and kept the Subscription details in a separate config file. I have called the config file by providing the location path. Every time when I am running the PowerShell scripts, it will include the Azure Subscription
    details from the mentioned path and the jobs will be automated.
    For past few days, the PowerShell script is unable to recognize the subscription details. This happens for every 12 hours.
    Hence I am manually importing the PublishSettingsFile and configuring it.
    Can anyone suggest some solution for this..
    Thanks in Advance! :)

  • RELEVANCY SCORE 3.07

    DB:3.07:Azure Powershell Module Not Connecting To Any Service zd


    I created a free trial subscription in Windows Azure, and installed Azure Powershell module in a Windows server 2008 machine.
    I download and import my publish settings file executing the following commands:

    PS Get-AzurePublishSettingsFile
    PS Import-Azure-PublishSettingsFile
    my file's absolute path

    But then when I try to see my subscription's information I get the following error:

    PS Get-AzureSubscription
    get-azuresubscription : Please connect to internet before executing this cmdlet

    This error occurs every time I try to get some info related to my windows azure account.

    What would it be? Is my publish settings file wrong? Do I have something blocking my PS and Azure connetion? Do I need to configure something on the Windows Azure server?

    Thanks in advance

    DB:3.07:Azure Powershell Module Not Connecting To Any Service zd

    Hi,
    Just checking in to see if the suggestions were helpful. Please let us know if you would like further assistance.

    If you have any feedback on our support, please click
    here
    .
    Cataleya Li
    TechNet Community Support

  • RELEVANCY SCORE 3.06

    DB:3.06:Azure Expressroute Module Not Installed 7k


    Hi,
    I am running through the “Configure and ExpressRoute Connection through an Exchange Provider” on MSDN,
    http://msdn.microsoft.com/en-US/library/azure/dn606306.aspx and things do not seem right.
    The documentation refers to downloading the Azure PowerShell modules here,
    http://go.microsoft.com/fwlink/p/?LinkID=320376, and it appears that the installer WindowsAzurePowerShell.3f.3f.3fnew.exe does not contain the Azure ExpressRoute PowerShell modules referred to in step 1 of the procedure.
    C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Expressroute.psd1
    The other Azure module referenced is also not installed,
    C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1
    Is there something that I am missing?
    When I was a member of the preview program, the0.72 version of the Azure PowerShell modules that Ganesh gave me had the ExpressRoute module (v1.0).
    The new version of the Azure powershell modules downloaded from MSDN is 0.82 and has no ExpressRoute module.
    Any ideas would be appreciated.
    Thanks,
    Mark

    DB:3.06:Azure Expressroute Module Not Installed 7k

    Mark,
    The new location is
    C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\ServiceManagement\Azure\ExpressRoute\ExpressRoute.psd1
    The document your referenced now includes an additional import command with the new location:
    Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\ServiceManagement\Azure\ExpressRoute\ExpressRoute.psd1'

    -Steve

  • RELEVANCY SCORE 3.05

    DB:3.05:Cant Login To Azure Powershell With The Same Login. 9z


    Hello,
    Last day i installed a VM in the managemend portal, and used Azure powershell to give some static ip's.
    Next day i try to login to my azure powershell and it says that my azure account is not valid....
    I still can use my account on the portal and msdn etc.
    How is this posible ?

    Greatings

    DB:3.05:Cant Login To Azure Powershell With The Same Login. 9z

    Hi,
    This is weird, may be related to the azure powershell subscription, however, I am glad to hear that this issue has been fixed, I will close this thread, if you have any further issues, welcome to our forum, thank your for posting.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click
    HERE to participate the survey.

  • RELEVANCY SCORE 3.05

    DB:3.05:Running Powershell Script From Cmd.Exe jz


    I am using a tool, which connects to remote host and i can use it to execute commands on cmd.exe . Which gives me output on my command line.When i try to run powershell script in the following way,cmd /c powershell 'C:\Users\XXXXXX\Desktop\abc.ps1'  which is interpreted on command line of remote host as powershell 'C:\Users\XXXXXX\Desktop\abc.ps1' which is syntactically correct because i can execute same on machine having powershell installed very correctly, also i can see output on cmd line..But here problem is when i remotly execute same command i.e. powershell 'C:\Users\XXXXXX\Desktop\abc.ps1' my command prompt doen not receive any output from remote command and it keeps on waiting for output and finally timeouts.Does prowershell behaviour on Cmdline is different than other commands?Anybody, Any Idea?

    DB:3.05:Running Powershell Script From Cmd.Exe jz

    You can use:

    powershell - File scriptfile args

    Regards,

    Wladimir Silva.
    MCSA M - MCITP

  • RELEVANCY SCORE 3.04

    DB:3.04:Guirunonce Commands Not Working 3j


    All, I am using SCVMM 2012 SP1. I have created a VM Template and on the OS Configuration tab I have added a Powershell script that I would like run at first logon. The problem is there is no visibility as to the script running, no error information
    I can see. The Powershell script is NOT running no matter what I do. The first command in the GUIRunOnce Commands is a Robocopy command to copy the Powershell script to the local C: drive of the newly created VM - this is being executed. It
    seems like the only thing that is NOT working is running a Powershell script. I cannot seem to figure out what is wrong, due to the aforementioned lack of error reporting. Any help would be greatly appreciated!

    Tim

    DB:3.04:Guirunonce Commands Not Working 3j

    Tried installing the vmmguest agentbefore sysprep my base image, same problem in Service Deployment.

  • RELEVANCY SCORE 3.03

    DB:3.03:Error Running Azurestoragefile Powershell Script? 3k


    I’m trying to run a simple PowerShell to create an Azure Files share from Azure Automation, but I get a strange error message.
    My script:
    workflow CreateFileShare
    {
    $ctx=New-AzureStorageContext olavtazurefiles myKey

    # create a new share
    $s = New-AzureStorageShare test -Context $ctx
    }
    Error:
    6/12/2014 3:45:40 PM, Error: New-AzureStorageShare : Cannot bind parameter 'Context'. Cannot convert the

    Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageContext value of type

    Deserialized.Microsoft.WindowsAzure.Commands.Storage.Model.ResourceModel.AzureStorageContext to type

    Microsoft.WindowsAzure.Commands.Storage.File.Model.AzureStorageContext.
    At CreateFileShare:6 char:6

    CategoryInfo : InvalidArgument: (:) [New-AzureStorageShare], ParameterBindingException
    FullyQualifiedErrorId :
    CannotConvertArgumentNoMessage,Microsoft.WindowsAzure.Commands.Storage.File.Cmdlet.NewAzureStorageShare
    Same script runs fine under PowerShell on my machine.
    The script is copied from:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx
    I have also downloaded and imported the required AzureStorageFile module as described in the article above.

    DB:3.03:Error Running Azurestoragefile Powershell Script? 3k

    I got this to work:
    workflow CreateFileShare
    {
    InlineScript
    {

    $ctx=AzureStorageFile\New-AzureStorageContext olavtazurefiles myKey”


    # create a new share

    $s = New-AzureStorageShare test2 -Context $ctx
    }
    }

  • RELEVANCY SCORE 3.03

    DB:3.03:Azuremanagementtoolssnapin Not Installed. kz


    Dear all,
    I am self learning the windows azure by using the azure tool kit and when i try to deploy the application by using powershell (following the Exercise 2: Using PowerShell to Manage Windows Azure Applications).

    when i execute the below command in powershell , it giving me an error saying.
    Add-PSSnapin AzureManagementToolsSnapIn
    Add-PSSnapin : The Windows PowerShell snap-in 'AzureManagementToolsSnapIn' is not installed on this machine.
    At line:1 char:13
    Add-PSSnapin AzureManagementToolsSnapIn
    CategoryInfo : InvalidArgument: (AzureManagementToolsSnapIn:String) [Add-PSSnapin], PSArgumentException
    FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
    How ever , i have installed the powershell commandlet from the below link
    http://wappowershell.codeplex.com/, but still getting the same error.
    By where do i get the AzureManagementToolsSnapIn? Any clue?
    I am using Windows 7 Home Premium and Powershell 1.0.
    Thanks
    Prakash

    DB:3.03:Azuremanagementtoolssnapin Not Installed. kz

    Hi Arwind,
    Thanks for the answer. Yes, it worked and i am able to deploy the service using powershell.
    thanks a ton.
    -Prakash

  • RELEVANCY SCORE 3.02

    DB:3.02:Azure Storage Blob: Access Azure Files Using Powershell Based On Your Interest kz


    I have two azure containers. One filled with lot of files and other is new container. With Azure storage explorer, the container with lot files does not work as it hangs due to large data in it.I would like to see the files of my interest using Powershell
    and move them to new container.
    Get-AzureStorageBlob -Container $container -Context $destContext lists all the blobs which is not practically good option as it is difficult to search all blobs as data is huge.
    I want to search say for example only .csv files or .txt files or search withpart ofname using Powershell .How can it be done?

    Note:
    I tried to use
    Get-ChildItem Get-AzureStorageBlob -Container $container -Context $destContext | Where-Object {$_.name -like *.csv}
    But it did not work.

    Could you please help me to achieve this using Powershell?

    DB:3.02:Azure Storage Blob: Access Azure Files Using Powershell Based On Your Interest kz

    That is my thread indeed !! Thank you for linking it as it would help others who are looking up in this forum :)

  • RELEVANCY SCORE 3.02

    DB:3.02:Tfservice Hosted Build Agent Doesnt Run Powershell Scripts As Part Of Build Process xz


    Hi,
    I quite struggle with setting up deployment process for our company project using TFService, Git and Azure cloud services.
    Our team project sources are hosted in TF-Git repo on TFService. We using hosted build agent to run builds and tests. Than I found article about deployment process automation using msbuild and powershell www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery.
    Based on this post blog.slalom.com/2011/08/19/building-and-deploying-windows-azure-projects-using-msbuild-and-tfs-2010I placed additional msbuild target into .ccproj to run package upload to Azure storage and deploy to Azure cloud service using powershell
    script. The script and azure publish settings is sitting in repo and is referenced from there.
    I configured my local machine to reflect hosetd build agent software setup (VS, Azure SDK, Powershell Cmdlest...) and when I hit the msbuild from cmdline all runs well - build, packaging, file (package, config) upload to azure storage, deploy using uploaded
    package from storage.
    But when I queue a build for hosted build agent (with same msbuild argumets), the process build and finish without errors. But it seems that the powershell script doesn't run or run but fails. I can't see any log messages I placed in my msbuild target and
    ps script. And there is nothing uploaded to azure storage and nothing deployed.
    That is build target added to .ccproj
    PropertyGroup
    DropFolder$(SorcesPath)\Web.Azure\bin\$(Configuration)\app.publish\/DropFolder
    Package$(AssemblyName).cspkg/Package
    CloudConfigServiceConfiguration.Cloud.cscfg/CloudConfig
    SubscriptionDataFile$(SorcesPath)\Deploy\PayAsYouGo.publishsettings/SubscriptionDataFile
    PSScriptLocation$(SorcesPath)\Deploy\DeployAzure.ps1/PSScriptLocation
    /PropertyGroup
    Target Name=AzureDeploy AfterTargets=CorePublish DependsOnTargets=CorePublish Condition=$(AzureDeployP)!=''
    Message Text=Start Powershell deploy process /
    Exec WorkingDirectory=$(MSBuildProjectDirectory)
    Command= $(windir)\system32\WindowsPowerShell\v1.0\powershell.exe -f $(PSScriptLocation) -dropFolder $(DropFolder) -package $(Package) -cloudConfig $(CloudConfig) -buildNumber $(BuildNumber) -subscriptionDataFile $(SubscriptionDataFile) /
    Message Text=End of Powershell deploy process /
    /Target
    These are hosted build agent process parameters:
    Solution to build:/src/Web.Azure/Web.Azure.ccproj
    Configuration/Platform: Release/AnyCPU
    MSBuild arguments:/t:Publish /p:TargetProfile=Cloud;AzureDeployP=True;SorcesPath=C:\a\src\src\
    The powershell script is based on script that is listed in first link mentioned above and it works locally.
    I can't use my own (or on-premisses) build controller/agent because TFS2012 Update 2 still doesn't support Git repositories. Using TFGit I'm not able to adjust build process workflow at all. I couldn't find any valuable documentation related to handling
    deployment process through TFService when using TFGit. There is a lot of posts about how to deploy to Azure using TFService and TFVC but I'm not able to adjust any of those ways to make it work on top of TFGit.
    Any thoughts?

    DB:3.02:Tfservice Hosted Build Agent Doesnt Run Powershell Scripts As Part Of Build Process xz

    Hi Josef,

    Thanks for your post.

    Since we haven't heard from you for a long time, I mark useful reply as answer. If you have any concerns, please feel free to reopen it or submit a new question. Thanks for your understanding.John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • RELEVANCY SCORE 3.01

    DB:3.01:Azure Automation - Issue With Backupazurevm Workflow 7s


    Hi I'm trying to Back up an Azure VM using Microsoft Azure Automation following Courenay Bernier's blog here:

    http://blogs.technet.com/b/cbernier/archive/2014/04/28/back-up-an-azure-vm-using-microsoft-azure-automation.aspx
    (using .ps1 file : https://gallery.technet.microsoft.com/scriptcenter/Back-up-an-Azure-VM-using-9545f0a1 )

    I was successful at running an ipconfig /all via RemotePScommand as outlined in his article but when I try running the BackupAzureVM workflow I run into this error:
    At line:159 char:8 $Uri = Connect-AzureVM -AzureConnectionName $AzureConnectionName -serviceName $S ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Could not find a parameter named 'AzureConnectionName'.

    #
    .SYNOPSIS
    Demonstrates backing up an Azure VM to an Azure storage account by using Azure Automation.

    .DESCRIPTION
    The following script will connect to an Azure VM, stop the VM, back it up to a storage account, and start the VM.

    Dependencies
    Connect-Azure runbook: http://gallery.technet.microsoft.com/scriptcenter/Connect-to-an-Azure-f27a81bb
    Connect-AzureVM runbook: http://gallery.technet.microsoft.com/scriptcenter/Connect-to-an-Azure-85f0782c
    Daniele Grandini's PowerShell Module: http://gallery.technet.microsoft.com/Powershell-module-for-b46c9b62#content
    Automation Certificate Asset containing the management certificate loaded to Azure
    Automation Connection Asset containing the subscription id name of the certificate asset

    .PARAMETER AzureConnectionName
    Name of the Azure Subscription defined in the Connect-Azure runbook. Reference my post for more information: http://blogs.technet.com/b/cbernier/archive/2014/04/08/microsoft-azure-automation.aspx

    .PARAMETER ServiceName
    Cloud Service the Azure VM is running under.

    .PARAMETER VMName
    Name of the Virtual Machine in Azure.

    .PARAMETER StorageAccountName
    Name of the Azure Storage Account to back up the VM to.

    .PARAMETER backupContainerName
    Name of the Container withing the Storage Account the VM will be backed up to.
    #

    I do have this documentation but not sure where I'm going wrong, I have created a certificate asset and my connection asset AUTOMATIONCERTIFICATENAME is pointing at it... not sure what to try next... Please advise

    DB:3.01:Azure Automation - Issue With Backupazurevm Workflow 7s

    Connect-AzureVM now uses OrgID credential auth, so it takes a credential asset instead of a connection asset. Please review the parameters of the Connect-AzureVM runbook in your automation account, and make sure to call the runbook using those parameters.
    It appears the runbook you are trying to use relies on an old version of Connect-AzureVM, and needs to be updated.

  • RELEVANCY SCORE 3.01

    DB:3.01:Remoteapp Template Upload Cannot Recognise 3c


    To prepare an image and sysprep it, I followed the instructions on the azure website
    In the he end my VM was shutdown following the sysprep.exe call(I assume that is expected).
    and I then copied into my clipboard the shell script generated in the Azure remoteapp upload template image
    I launch Azure powershell on my local machine and paste the code in and I get this error message :
    .\Upload-AzureRemoteAppTemplateImage.ps1 : The term '.\Upload-AzureRemoteAppTemplateImage.ps1' is not recognized a
    the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
    included, verify that the path is correct and try again.
    Am I missing something?

    DB:3.01:Remoteapp Template Upload Cannot Recognise 3c

    Hi,
    Currently there isn't a way to directly point to an Azure VM as a RemoteApp template image. If you email us at remoteappforum (at Microsoft), we can work with you to get your image into RemoteApp from Azure.
    Thanks,
    Jim

  • RELEVANCY SCORE 3.01

    DB:3.01:Altiris Powershell Script Not Running On Windows 7 az


    Hi All,
    I want to push a powershell job to Windows 7 computer, but itis not runnning. Butthis scriptcan be run in Windows XP computer, so not sure what is the problem.
    Can someone help me please.
    Thank you.

    Here is the sample script.
    invoke-item c:\windows\system32\calc.exe

    Cheers,
    Andrew

    DB:3.01:Altiris Powershell Script Not Running On Windows 7 az

    do you have an error message?
    also you typically use invoke-item for something like a document. when you want to just execute a process you can use invoke-command

  • RELEVANCY SCORE 3.00

    DB:3.00:Powershell Script For Automating Vm Checkpoint Creation dd


    Is it possible to leverage PowerShell in order to automate the creation of checkpoints for our Windows vms running on 2008 R2? If yes, can the script be scheduled through SCVMM R2? I've been looking on technet for existing scripts that can do this, not been able to find anything.

    DB:3.00:Powershell Script For Automating Vm Checkpoint Creation dd

    If you're using SCVMM, you should have a built-in cmdlet to do this. I'll have to look up the documentation (tomorrow). You can definitely schedule any cmdlet once you find the one you need. Does SCVMM have a built-in scheduler?

  • RELEVANCY SCORE 3.00

    DB:3.00:Create A Vm In Azure sx


    at the same time the powershell ISE is not connected to my sucription but the azure powershell is.
    (tested by running get-azuresubscription - works fine in the powershell but doesnt in the ise.
    i am havin trouble with this because i can not execute the script to create a VM , it keeps telling me

    You MUST specify a certificate. Call Set-AzureSubscription and Select-AzureSubscription first.

    DB:3.00:Create A Vm In Azure sx

    Hi,
    I’ve only seen this when the certificate is not specified. Call Get-AzureSubscription and it should show you whether the cert is configured or not.
    You can use Set-AzureSubscription to resolve.

  • RELEVANCY SCORE 3.00

    DB:3.00:Any Way To Change The Arr Timeout In Azure Websites As Well As The Load Balancer Timeout? jf


    Dear Azure Websites Team
    Question: I want to know if it is possible to change the ARR Timeout in Azure Websites.

    Reason : I know it is possible if i install ARR myself on a VM. But how to do this in Azure Websites? The default of a few minutes is not enough for my application.
    Furthermore did the Azure Websites Team change the Load Balancer Timeout to e.g. 15 minutes also using the Powershell command you would need to run to change this?
    Thank you
    Tim

    DB:3.00:Any Way To Change The Arr Timeout In Azure Websites As Well As The Load Balancer Timeout? jf

    Hi, Tim. You cannot modify the timeout of the ARR front-end.
    Jim Cheshire | Microsoft

  • RELEVANCY SCORE 3.00

    DB:3.00:Thread: Powershell Script To Turn On System Protection jj


    I\'m trying to run a powershell script to turn on system protection on my computers c: drives as it was not turned on in the base image. It seems that I\'m having a problem with rights in the powershell script as some powershell scripts need to run as administrator.

    This is my script, unless somebody else has any way to enable system protection that is all I\'ve found.

    Code:

    DB:3.00:Thread: Powershell Script To Turn On System Protection jj

    Same thing I\'m doing, but you\'re not taking a restore point (that is what takes 60-90 seconds depending on the computer). If I\'m going to enable system restore than I want to take a restore point as well so I have a safe rollback point.

  • RELEVANCY SCORE 2.99

    DB:2.99:Linux Vm Creation With Custom Script d8


    Hi,
    I have a requirement of creating a Linux Vitual Machine(Ubuntu Version) in Azure. But I don't have any option to add the custom script to VM that to be provisioned with some sort of initial start up programs. The Azure is now supporting the same for windows
    version machines through powershell and GUI as well. But I did not find any such option for Linux Images. Some one said in some of the

    portal that this task can be done using through the Azure-Xplat Cli. I have gone through the same for provisioning the Vm with some custom script, but i was unable to create means I was unable to figure out how to use that custom script option and
    other options for the same.
    The following is the example using azure-xplat cli
    Ex:azure vm create --vm-size extrasmall --location East US --ssh 22 --no-ssh-password
    --ssh-cert ~/.ssh/NatAzureCert.pem --custom-data ~/Azure/linux/NatCustomTest nattest 0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.5-x64-v13.5.2 nat
    Can you please nay one help on how to create a Linux VM with custom Script.
    Thanks in advance.

    Thanks and Regards
    Bhaskar Desharaju

    DB:2.99:Linux Vm Creation With Custom Script d8

    Hi Stephen,
    The --custom-data option is working fine. Now able to provision the Linux vm with custom script.
    But there is problem with azure-cli, I was not able to find any option to set a static IP as like in powershell set-azurevnetstaticip.
    And it always trying to create 22 public port if I mention --SSH. But If my cloud service is already having a vm with 22 public port, and if I try to create another vm with --ssh, port conflicts happening. So I mentioned like --ssh random public
    port number. But each time i cannot enter the Public port, It has to create a random public port for ssh as like in azure powershell or GUI.
    Is there any other solution.

    Thanks Regards
    Bhaskar.D.

  • RELEVANCY SCORE 2.99

    DB:2.99:How To Install Azure Sdk On Azure Automation jm


    i have a powershell script that connect to storage table and read the data from a Table. which works fine on the local where Azure SDK 2.1 is installed.
    While i add it as part of Azure automation i get an error as not able to resolve Microsoft.WindowsAzure this is because we donot haveAzure SDK on the machine where this
    runbook of azure automation is running.
    IS there any option to enable/install Azure SDK on the machine where runbook executes?
    Is there any alternate option to upload required assemblies as part of setting so that runbook could use while executing.
    below is the sample power shell script to connect to storage table.
    [string]$storageAccountName ='xxxxx'
    [string]$storageAccountKey =’xxxxxxx'
    $accountCredentials = New-Object Microsoft.WindowsAzure.Storage.Auth.StorageCredentials $storageAccountName, #Create instance of CloudStorageAccount object
    $storageAccount = New-Object Microsoft.WindowsAzure.Storage.CloudStorageAccount $accountCredentials, $true
    #Create table client
    $tableClient = $storageAccount.CreateCloudTableClient()

    DB:2.99:How To Install Azure Sdk On Azure Automation jm

    This is not a scripting question. You need to ask this in the Azure forum.
    Jut adding a bit of script to your question does not make it a script issue. Yu need to as the Azure techs how to install and manage the Azure platform. They will give you links to the docs you need to learn how to deploy Azure.
    The SDK can be downloaded from Microsoft.
    ¯\_(ツ)_/¯

  • RELEVANCY SCORE 2.99

    DB:2.99:Could Not Establish Secure Channel For Ssl/Tls With Authority Management.Core.Windows.Net cc


    I'm currently in the process ofautomating service deployment on to the Azure Fabric using powershell and my own management certificate. I'm receiving the following error:
    New-AzureDeployment : Could not establish secure channel for SSL/TLS with authority 'management.core.windows.net'.
    At C:\temp\azure\AzureDeploy.ps1:45 char:34
    $opstat = New-AzureDeployment -ServiceName servicename -Package path -Configuration path -Slot Staging -labe
    l Some Acceptable Label
    CategoryInfo : CloseError: (:) [New-AzureDeployment], SecurityNegotiationException
    FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.HostedServices.NewAzureDeploymentCom
    mand

    The management certificate was created with private key from the following command:
    makecert.exe -r -pe -a sha1 -n CN=Azure Management Certificate -ss My -sr CurrentUser -len 2048 -sky exchange -sp Microsoft Enhanced RSA and AES Cryptographic Provider -sy 24 C:\TestBench\Azure\AzureManagement.cer

    The certificate was exported DES, without private key, to the azure management portal.
    The publishsettings file was created using a console app which encoded the management certificate in my local certificate store
    Convert.ToBase64String(certificate.Export(X509ContentType.Pkcs12, string.Empty));
    The beginning of the powershell script uses the following combination of commands to setup the remaining deployment:
    Import-AzurePublishSettingsFile –PublishSettingsFile path
    Write-Output Get subscription
    Get-AzureSubscription
    Write-Output Set subscription
    Set-AzureSubscription -SubscriptionName sub -CurrentStorageAccount storage account

    I ensured files were deleted from the powershell's appdata.
    All the above was 'Run as Admin...'WinHttpCertCfg showed that the private key was accessible.
    What is going wrong here?

    DB:2.99:Could Not Establish Secure Channel For Ssl/Tls With Authority Management.Core.Windows.Net cc

    Good. It would appear that the problem is with the management certificate. At this point, I wouldn't spend too much time testing from a different machine or network.
    The command line you used to generate the certificate appears to be fine. So it might be a problem with the way the certificate was installed in your workstation or how it was uploaded to the management portal. I would now test by generating a new certificate
    using the same command line that you used earlier.
    makecert.exe -r -pe -a sha1 -n CN=Azure Management Certificate -ss My -sr CurrentUser -len 2048 -sky exchange -sp Microsoft Enhanced RSA and AES Cryptographic Provider -sy 24 AzureManagement.cer
    If you generate the certificate in your user account, it will install it in the correct location (CurrentUser\My). *Do not* generate a publish settings file or run Import-AzurePublishSettingsFile.
    Upload the new certificate (AzureManagement.cer file) to the management portal by going to Settings | Management Certificates | Upload. Copy the thumbprint of the new certificate and the subscription Id from the management portal. Avoid copying it from the
    certificates properties or at least be aware that there's an
    issue when you do this.
    Run the commands you used previously to test the subscription:
    Set-AzureSubscription -SubscriptionName MySubscription -SubscriptionId YOUR-SUBSCRIPTION-ID -Certificate (Get-Item Cert:\CurrentUser\My\YOUR-CERTIFICATE-THUMBPRINT)
    Select-AzureSubscription MySubscription
    Get-AzureLocation
    Note that there's no need to Run as administrator to generate the certificate or when running the commands above.

  • RELEVANCY SCORE 2.99

    DB:2.99:How Can I Get The Current Status For A Sql Azure Database Using Powershell? s7


    Im trying to copy a SQL Azure database and then run a sql
    script on it using PowerShell. The problem is that the
    database is not ready when the sql script is run. I am trying to create a
    polling loop that waits untill the database is ready, but I can't figure out how
    to get the status thats available in the Azure managment portal(i.e Online). I
    have tried the following but the status says 1024.
    $sqlDatabaseInstance = Get-AzureSqlDatabase -Context $databaseServerContext -DatabaseName $database

    $sqlDatabaseInstance.Status

    Does anyone know how to get the current status for a SQL Azuredatabase using PowerShell?

    Bjørn F. Rasmussen Developer@Avanade

    DB:2.99:How Can I Get The Current Status For A Sql Azure Database Using Powershell? s7

    Im trying to copy a SQL Azure database and then run a sql
    script on it using PowerShell. The problem is that the
    database is not ready when the sql script is run. I am trying to create a
    polling loop that waits untill the database is ready, but I can't figure out how
    to get the status thats available in the Azure managment portal(i.e Online). I
    have tried the following but the status says 1024.
    $sqlDatabaseInstance = Get-AzureSqlDatabase -Context $databaseServerContext -DatabaseName $database

    $sqlDatabaseInstance.Status

    Does anyone know how to get the current status for a SQL Azuredatabase using PowerShell?

    Bjørn F. Rasmussen Developer@Avanade

  • RELEVANCY SCORE 2.99

    DB:2.99:Ok One More Time - Running Powershell As A Service m9


    Hi,
    I have a script that watches a folder for any new files created. The problem of using this is that Powershell needs to be running on the machine.
    If powershell is close the jobs go away.
    Is there any way I can run this script as a service ? So that powershell is on all the time.
    Thank you

    DB:2.99:Ok One More Time - Running Powershell As A Service m9

    This is a very good suggestion, the only reason I donot want to use the task manager, is because I have to automate the installation of the script on nearly 2000 machines.
    Managing the task scheduler is another extra task.

  • RELEVANCY SCORE 2.99

    DB:2.99:Windows 8 Enterprise Powershell Error When Performed Batch Create 9k


    Dear admin,

    I fresh installed a Win 8 Enterprise, installed Win Azure AD Module for Win Powershell and running a working script and received the error as below.

    A variable that cannot be referenced in restricted language mode or a Data
    section is being referenced. Variables that can be referenced include the
    following: $PSCulture, $PSUICulture, $true, $false, and $null.
    CategoryInfo : InvalidOperation: (:) [], RuntimeException
    FullyQualifiedErrorId : VariableReferenceNotSupportedInDataSection
    PSComputerName : pod51053psh.outlook.com

    The script is a running script on Win 7 currently without any error. This script is to batch create user in Office 365.

    Thanks.

    DB:2.99:Windows 8 Enterprise Powershell Error When Performed Batch Create 9k

    Please post this on theAzure forum.
    See the following. You have your system configured incorrectly for Azure.
    http://technet.microsoft.com/en-us/library/dn433292.aspx
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/ebfc3f6f-c550-488c-ae01-01392e04ca55/invokecommand-on-exchange-2010-fails?forum=ITCG
    ¯\_(ツ)_/¯

  • RELEVANCY SCORE 2.99

    DB:2.99:Error On Powershell : Set-Azurewebsite -Name Websitename -Slotstickyappsettingnames @(Settingname) 8s


    got a strange error message on the PS script to set SlotStickyAppSettingNames.

    I use:
    Set-AzureWebsite -Name WebSiteName -SlotStickyAppSettingNames @(SettingName)

    and what ever I try I get a error message: Set-AzureWebsite : Requested value 'VS2014' was not found.

    anyone an idea , i'm using azure sdk2.5 and the website is deployed with VS2015 preview, but I think that shouldn't make a difference?

    thx,
    Clemens

    Clemens

  • RELEVANCY SCORE 2.99

    DB:2.99:Is There Anyway To -Confirm:$False When Starting A Powershell As Admin, To Avoid Uac fk


    Hi
    I have some PowerShell code at the top of my PowerShell script that checks if the script is running as an admin, if not then it will start running as admin:

    # ===================================================================================
    #Checks wheather the script is running as admin, if not then starts as admin.
    # ===================================================================================

    If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] Administrator))

    {
    $arguments = ' $myinvocation.mycommand.definition '
    Start-Process powershell -Verb runAs -ArgumentList $arguments
    Break
    }

    Whenever running my script I am prompted by windows UAC, is there anyway to bybpass this prompt?
    I know i could disable uac on my user, but id rather not.

    br

    Bjorn

  • RELEVANCY SCORE 2.98

    DB:2.98:How To Fully Automate Creation And Initial Config Of Ubuntu Vm In Azure Virtual Machines? az


    Hi,
    Can anyone share some pointers on what is the best way to automate (as in scripting - CMD, PowerShell, Node.JS, Python) the process to create and setup a Ubuntu VM in Azure Virtual Machines?
    The ideal would be something to be able have a simple
    my-wonder-script c:\work\my-vm-config.xml
    I already know how to create a VM via Azure client tools, but I haven't found a way to feed it a simple XML file with all azure-specific configs.
    Also, how can I configure cloud-init data? In AWS EC2 one can configure user data and cloud-init picks it up.

    I could not find any similar mechanism in Azure to do the initial config of the machine (from ssh keys to apt-get install packages).
    Thanks,
    Joao

    DB:2.98:How To Fully Automate Creation And Initial Config Of Ubuntu Vm In Azure Virtual Machines? az

    Yes, that is what I was looking for.
    As per that forum question, when using --custom-data argument to azure, the content a local file is passed as userdata to Ubuntu's cloud-init.
    As a suggestion, maybe someone could update the online documentation and the node.js, and make it more visible, since this is a critical part of automating Linux VM management.
    (btw, how can I do the same on Hyper-V?)
    Thanks a lot Michael!

  • RELEVANCY SCORE 2.98

    DB:2.98:Tfs Azure Deployment - No Deployment: Code 881 From Powershell File x1


    Hi,
    I've followed this article and every thing is running correctly - except that at the end of the build, I get a green tick and no deployment. I've followed the following article

    http://blogs.msdn.com/b/tomholl/archive/2011/12/06/automated-build-and-deployment-with-windows-azure-sdk-1-6.aspx
    I get the following in the build log:
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\1.6\ImportAfter\AzureDeploy.targets (8): The command C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -f d:\builds\AzureDeploy.ps1 bin\Debug\app.publish\ project.cspkg Profiles\Production1.azurePubxml
    exited with code 881
    I've tried running the command manually on the build server and I can get past this error by passing the correct path into the powershell script. However, I then get another error:

    Invalid package: project.cspkg
    I've verified that the file does actually exist in the bin\Debug\app.publish folder. What could be the issue here?
    I'm using Azure SDK v1.6
    Has anyone come across this?

    thanks

    DB:2.98:Tfs Azure Deployment - No Deployment: Code 881 From Powershell File x1

    Hi ossent,
    Since you are using an open source sample project to do this, you may get direct help or suggestion via leaving a comment on theAutomated
    Build and Deployment with Windows Azure SDK 1.6blog postor asking a question in the QA section of

    Windows Azure Build Deployment Sample project.
    ================
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Thanks Regards,
    Alex
    Microsoft Online Community Support

  • RELEVANCY SCORE 2.97

    DB:2.97:Azure To On-Premise Vpn Connectivity Issue fj


    Hi, I have been using VPN to connect to on-premise machines from azure VMs. Since yesterday the VPN is getting disconnected repeatedly. I deleted the VPN instance from my machine and downloaded 64 bit client VPN package from azure portal. I ran that exe
    which installed the files in my system. The installed files are named as '44e272d5-32d0-498f-8644-5c9abf98f9dd.***'. My virtual network id is also '44e272d5-32d0-498f-8644-5c9abf98f9dd'. Earlier network name in 'Network Connections' used to be '44e272d5-32d0-498f-8644-5c9abf98f9dd'
    only but this time after installation it is 'devhbvirtualnetwork' which is network name in azure.
    I do auto-connect of VPN using powershell script for which I use rasphone. The installed 44e272d5-32d0-498f-8644-5c9abf98f9dd.pbk file contains entry for devhbvirtualnetwork so I am not able to connect VPN automatically.
    Can you please help?

    DB:2.97:Azure To On-Premise Vpn Connectivity Issue fj

    Hi,
    By default, the client computer will not reestablish the VPN connection automatically.
    I thinks you could reconnect to azure manually.
    Regards.
    Vivian Wang

  • RELEVANCY SCORE 2.97

    DB:2.97:Script Runs Fine In Ps, Running From C# Gives Execution Of Scripts Disabled, System Set To Unrestricted 33


    My system is set to executionpolicy level of unrestricted. I am running a powershell script I wrote on another machine. It runs fine from powershell and from the commandline via powershell myscript.ps1

  • RELEVANCY SCORE 2.97

    DB:2.97:Azure Powershell 88


    Hello,
    Azure Powershell is not able to see any VM or cloud service which are created using azure portal . Is this expected behaviour?

    DB:2.97:Azure Powershell 88

    Windows Azure documentation is great. But, maybe it will help a shortcut to get your started with Azure PowerShell commands. Check my blog series I did so can get started at:
    http://www.maxtblog.com/2013/08/getting-ready-with-windows-azure-sql-database-server-powershell-and-smo-part-12/
    Briefly, you need the following:
    1. Set your Windows Azure Subscription.
    2. Installed Azure PowerShell cmdlets (August 2013)
    3. Create a Certificate and use the Portal to install it.
    4. Follow the sample scripts to connect to your Azure subscription. (see blog)
    Once you do this script to set the Azure subscription the first time successfully then you don't need to use unless you make changes. In order word, you just can open PowerShell and start using your Azure cmdlets.
    I hope you'll find my blog series useful.
    :)
    Max

    Thanks, Max Trinidad Microsoft MVP - PowerShell Florida PowerShell User Group: http://www.flpsug.com/ Blog: http://www.maxtblog.com/ Old Blog: http://maxt2posh.wordpress.com/ Follow me on Twitter: @MaxTrinidad Member of: CITGA, UGSS, INETA and PASS.

  • RELEVANCY SCORE 2.97

    DB:2.97:Powershell: Find Running Script/Exe 7k


    I have written a few powershell test application to test my application. I want to check remotely if any of my test application is running or not? Is there any way to find if Windows Powershell is runnung any exe or powershell script?The task manager does
    not list additional process that is run from Windows powershell..

    Regards
    Jugaari

    DB:2.97:Powershell: Find Running Script/Exe 7k

    Thanks Peter for the deatiled answer. I will look into the solutions.

  • RELEVANCY SCORE 2.97

    DB:2.97:Powershell Execution Policy And Scom a7


    I have seen some powershell scripts in the Exchange management packs. Also running PowerShell scripts is now supported directly fromSCOM.
    I have a few questions about SCOM and PowerShell. Since I can't find the answers on the net, this should be the place to ask :) :

    What PowerShell execution policies are supported by SCOM? Or are the PowerShell scripts executed outside the execution policies?
    Are allPowerShell scripts used by Microsoft in it'smanagement packssigned. And if not, why not?
    Is pasting a signed PowerShell script into a management pack (sealed and non-sealed) supported (will it be regenerated correctly at the agent side).
    Can signing a PowerShell script for use in a management pack be forced in the SCOM environment (rejecting non-signed (PowerShell) scripts).
    Is it possible to instruct the agent to sign the PowerShell scripts when re-generating the PowerShell scripts, so any non-signedPowerShellscript from a (sealed) mangement pack can be used on a system that enforcesthe AllSigned policy.

    Especially since PowerShell scripting will be used more and more, also signing (or not) will be more and more an issue (or not if fully supported by SCOM).Regards,
    Marc Klaver
    http://jama00.wordpress.com/

    DB:2.97:Powershell Execution Policy And Scom a7

    Thanks for the answers!Regards,
    Marc Klaver
    http://jama00.wordpress.com/

  • RELEVANCY SCORE 2.96

    DB:2.96:Unable To Install Windows Azure Active Directory Module - Powershell 93


    I'm facing an issue whereby I am unable to install Windows Azure Active Directory Module Found here Windows Azure AD for Powershell

    Background:

    I am Running Windows 7 with Service Pack 1.
    Powershell 4.0 is currently installed.
    Microsoft.Net Framework 3.5.1 is checked under programs and Features
    Microsoft Online Services Sign-in Assistant Both Beta and non Beta versions were installed..PC rebooted and no luck with either of them.

    The current Error

    In Order to install Windows Azure Active Directory Module for Windows PowerShell, you must have windows PowerShell 2.0 or greater installed on this computer

    I have read many posts online and none of them appeared to have helped.

    http://social.msdn.microsoft.com/Forums/en-US/46a38822-28a4-4abb-b747-96f7db2a2676/cannot-install-azure-active-directory-module-for-windows-powershell-mossia-is-not-installed?forum=WindowsAzureAD

    Don't really know what else I can try from my end so any further help you can provide would definitely assist.

    I'd post screenshots but I'm getting the message
    Body text cannot contain images or links until we are able to verify your account. If someone can Microsoft can help with this as well it would be appreciated.
    So instead here are some hyperlinks:
    http://i.stack.imgur.com/sUuzz.png
    http://i.stack.imgur.com/CW1Tk.png
    http://i.stack.imgur.com/SS3jg.png

  • RELEVANCY SCORE 2.96

    DB:2.96:Getting You Must Install Windows Azure Powershell For Node.Js Trying To Install Tools For Mongodb xm


    Good evening folks. I'm running into a bit of an issue that is a bit frustrating. When following the steps fromwww.interoperabilitybridges.com/Azure/Getting_Started_Guide_Node_with_MongoDB.asp on getting started with MongDB on Azure, I've
    installed the latest Azure Tools SDK for Node.js, but when I go to install the Windows Azure tools for MongoDB and Node.js, I get an error from the installer: You must install windows azure powershell for node.js.

    Going back and checking, the powershell for node.js portion is installed, so I'm a bit at a loss what else we're supposed to do. I have another system I plan to test this on tomorrow, but this is definitely a feature I'm interested in working
    with.
    Thank you folks.
    Scott

    DB:2.96:Getting You Must Install Windows Azure Powershell For Node.Js Trying To Install Tools For Mongodb xm

    Neil, the updated tutorial is on the Windows Azure
    Developer Center.
    Can you please vonfirm the issue you've been facing has been resolved?

  • RELEVANCY SCORE 2.96

    DB:2.96:Runonce In Azure Vm Provisioning j9


    Hi,
    Is there any way I can provide a command or script which can run automatically after VM is provisioned. Similar to runonce?
    There is a powershell command Add-AzureProvisioningConfig, but it does not expose any switch to supply a script.
    Please suggest.

    - Sandeep Bhutani

    DB:2.96:Runonce In Azure Vm Provisioning j9

    Hi,
    VM Extensions seems to be a good solution. Will test it.
    However this does not seem to be working for Linux machines.
    -Sandeep Bhutani

  • RELEVANCY SCORE 2.96

    DB:2.96:Cannot Install Azure Active Directory Module For Windows Powershell. Mossia Is Not Installed ac



    On my Windows Server 2008 R2, when trying to install
    Windows Azure Active Directory Module for Windows PowerShell i got the following error message (although Microsoft Online Services Sign-In assistant version 7.0 is installed)

    In order to install Windows Azure Active Directory Module for Windows PowerShell, you must have Microsoft Online Services Sign-In Assistant version 7.0 or greater installed on this computer

    NB : on a french server Pour installer le Module Windows Azure Directory pour windows PowerShell, l'Assistant de connexion de Microsoft Online Service 7.0 ou version ultérieure doit être installé sur cet ordinateur.

    Tried to uninstall/ /repair / ... Microsoft Online Service Sign-In assistant, but not helped....

    Etienne Bailly | SharePoint Consultant |
    My Blog

    DB:2.96:Cannot Install Azure Active Directory Module For Windows Powershell. Mossia Is Not Installed ac

    Hi ReliableRick,
    I just uninstalled/re-installed MOSSIA and Azure AD PS module and did not hit any error. In my case it installed MOSSIA v 7.250.4556.0. Can you clarify/confirm what error you are seeing? Is it exactly the same as Etienne's original post? I know the engineering
    team recently spent time working out various problems with this installation, so very interested to see what might be wrong here.

    Thanks,
    Justin

  • RELEVANCY SCORE 2.96

    DB:2.96:Can We Use Cloudbess For Ci And Deploy To Azure? 3z


    Hi,
    Since Cloudbess runs on Linux and the powershell cmds used to deploy to our Azure account are not available, is there a way of deployment of our app built by Jenkins CI on Linux to Azure?
    If this is impossible has anyone put Jenkins on Azure to run the buiild test cycle in situ?
    Thx.
    David

    DB:2.96:Can We Use Cloudbess For Ci And Deploy To Azure? 3z

    David, have you been able to automate deployment using our guide?
    http://www.windowsazure.com/en-us/manage/linux/how-to-guides/howto-service-mgmt/
    In addition, we don't see any blockers toin situdeployment of Jenkins, but I will look at what additional information I can offer you.
    Thanks!
    Patrick [MSFT]

  • RELEVANCY SCORE 2.95

    DB:2.95:Running A Script Based On The Output Of Powershell Test z7


    Interesting Powershell job I'd like to run, not sure the best way to implement this.
    There is a PS command I run to get an output, which is either PASS or FAIL.
    Test-Myjob -server Server1
    If the Output is FAIL, then I'd like to run a remediation script to fix this
    Remediation.ps1 Server1
    Any ideas?

    DB:2.95:Running A Script Based On The Output Of Powershell Test z7

    How about something like this:

    $server = Server1
    if ((Test-Myjob -server $server) -eq FAIL){ ./c:\scripts\remediation.ps1 $server}

  • RELEVANCY SCORE 2.95

    DB:2.95:Error When Testing Powershell Script On Azure Automation Runbook (Error : Input Object Cannot Be Bound To Any Parameters...) ax


    Hello,
    I am getting error while running powershell script in windows azure automation runbook.
    This is my script that raised the error
    $subName = My Subscription Name
    $serviceName = MyServiceName
    $vmName = MyVMName

    Connect-Azure -AzureConnectionName $subName

    Select-AzureSubscription -SubscriptionName $subName

    $vm = Get-AzureVM -ServiceName $serviceName -Name $vmName
    $vm
    #Error occur after executing this line Get-AzureOSDisk
    $vmOSDisk = $vm | Get-AzureOSDisk
    $vmOSDisk
    Full error message is
    ==========
    7/31/2014 4:04:16 PM, Error: Get-AzureOSDisk : The input object cannot be bound to any parameters for the command either because the command does
    not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    At Stop-MyDemo:67 char:67

    CategoryInfo : InvalidArgument: (Microsoft.Windo...ntVMRoleContext:PSObject) [Get-AzureOSDisk],
    ParameterBindingException
    FullyQualifiedErrorId :
    InputObjectNotBound,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs.GetAzureOSDiskCommand
    ==========
    I can call that $vm | Get-AzureOSDisk on my local computer using Windows Azure Powershell. Is there any syntax difference withing windows azure powershell and the script that used by Windows Azure Automation Runbook?
    Azure module was imported (that I found under ASSETS).

    Please advise,
    Thanks

    DB:2.95:Error When Testing Powershell Script On Azure Automation Runbook (Error : Input Object Cannot Be Bound To Any Parameters...) ax

    Well, here it is 12/2/2014 and Get-AzureOSDisk, while showing in the Azure Module, certainly does not work. I've tried everything, including things like:
    This is really holding people up from backing up VM's since we cannot get a handle on the OSDisk or the DataDisks!
    $StorageAccountName = $VM.VM.OSVirtualHardDisk.MediaLink.Host.Split('.')[0]

  • RELEVANCY SCORE 2.95

    DB:2.95:Why Does A Sql Azure Dacpac Upgrade (Via A Powershell Script) Consistently Take 30min To Complete 89


    I created a PowerShell script to upgrade a SQL Azure instance with my latest DACPAC (taken fromhttp://msdn.microsoft.com/en-us/library/ee634742.aspx).
    What I have experienced whenrunningmy PowerShellscriptis that itconsistentlytakes approximately 30min to execute. The script is idle for almost half an hour waiting on$dacstore.IncrementalUpgrade($dacName,
    $dacType, $upgradeProperties) to return from execution and nothing is printed out on the PowerShell console window. Only right at the end of the half hour does theincrementalupdate start spitting out console messages which inform me that
    the upgrade is taking place (essentially it appears that the script has hung for 30min until it finally comes back alive and the script does this consistently every time).
    Does it usually take this long for the IncrementalUpgrade to complete and is there supposed to be a 30min period of inactivity/waiting?
    Note that I am running the PowerShell script from my local machine which is external to the Azure network.
    Thanks for any insight you can give for this, I am hoping that I can reduce this incremental upgrade process to substantially less than 30hr so that mycontinuousintegration build doesn't take so long.

    DB:2.95:Why Does A Sql Azure Dacpac Upgrade (Via A Powershell Script) Consistently Take 30min To Complete 89

    It is not fixed with SQL 2012. Data-tier deployments and Updates still take an age when driven through Powershell, even when Powershell is driving a DLL that calls sqlpackage.exe.

    MS need to get a handle on this as we are stuck messing about with scripts until this technology is fit for purpose.

  • RELEVANCY SCORE 2.95

    DB:2.95:Dns Server Registration Automate Using Powershell 3.0 89


    Hi,
    We are working on deployment process automation script using PowerShell 3.0 to creating VMs, vnet, AD DS configuration etc in Azure environment.
    We almost done the deployment process automation except few limitations. There is an issue when we join the server to the AD domain. we getting an error saying given AD server name is not found cannot reachable.
    Later we found that DNS server should be registered in Azure Portal and need to add to the virtual network by selecting DNS server list under network configurations. However we need to eliminate this manual steps and find a way to automate using PowerShell
    script. Appreciate your helps to resolve this problem. below given is the manual steps when adding using azure management portal.

    Network Service - Virtual Network - Register DNS Server
    Networks - select a network from table - click for the detail view - select configuration menu - select the DNS server registered above.

    Thanks.

    DB:2.95:Dns Server Registration Automate Using Powershell 3.0 89

    Hi,
    There appears to be no PowerShell command to directly set the registered DNS server in a Vnet rather we can use the belowmethod to download the import the configuration to Azure.
    Please check the below links for more information.
    http://msdn.microsoft.com/library/azure/jj156097.aspx
    http://msdn.microsoft.com/library/azure/jj157100
    http://gallery.technet.microsoft.com/scriptcenter/Create-Multiple-Windows-df9e95b7

    Regards,
    Mekh.

  • RELEVANCY SCORE 2.95

    DB:2.95:Powershell Add-Azureaccount And Authentication_Failed xz


    Hello,
    I was using the Add-AzureAccount powershell command to log on to my azure subscriptions from powershell. However recently this command started to fail and I cannot log on again. The error message is
    Add-AzureAccount : authentication_failed: The system cannot locate the resource specified.
    The Add-AzureAccount command opens a browser dialogwith textThe system cannot locate the resource specified. The log on screen does not appear.
    What's wrong?

    This is what I'm expecting to happen
    http://michaelcollier.wordpress.com/2013/10/28/windows-azure-ad-authentication-support-for-powershell/

    Thanks

    DB:2.95:Powershell Add-Azureaccount And Authentication_Failed xz

    Hi ps279,
    I think you could connect to Azure support ASAP, it's free, and it's the best choice for you.

    Please contact support team by creating a support ticket at
    http://www.windowsazure.com/en-us/support/contact/

    Or if that doesn't work because you don't have an active subscription you will need to contact general customer support to have them create a support ticket for you

    http://support.microsoft.com/gp/customer-service-phone-numbers?wa=wsignin1.0
    Regards,
    WillWe are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click
    HERE to participate the survey.

  • RELEVANCY SCORE 2.94

    DB:2.94:Calling Function From Powershell sc


    I have a very simple PowerShell script that is shown below:
    function hello()
    {
    write-host hello hank
    }
    The script is named c:\Azure\pstest1.ps1
    I have no problem running script, if I pass the raw script into powershell however I get execptions thrown with the following code:
    public void DoSomething()
    {
    string scriptText = File.ReadAllText(@c:\azure\pstest.ps1);
    Runspace runspace = RunspaceFactory.CreateRunspace();
    runspace.Open();
    Pipeline pipeline = runspace.CreatePipeline();
    pipeline.Commands.AddScript(scriptText);
    pipeline.Commands.Add(hello());
    pipeline.Commands.Add(Out-String);

    CollectionPSObject results = pipeline.Invoke();

    runspace.Close();

    StringBuilder stringBuilder = new StringBuilder();
    foreach (PSObject obj in results)
    {
    stringBuilder.AppendLine(obj.ToString());
    }
    }

    Any help would be appreciated.

    Thanks

    hank voight

    DB:2.94:Calling Function From Powershell sc

    Hi hank,
    What exception have you got? Is it the same with what
    this thread was talking about?
    Please comment out this line:
    //pipeline.Commands.Add(hello);
    And modify the script file like this:
    function Hello
    {
    write-host hello hank
    }
    Hello

    Because you use write-host command in the power shell file, you'll encounter not support user interaction problem, for the solution of this problem, you need to implement PHOST interface to get around this problem. For details please check this
    thread:
    Run PowerShell script from C# writing to input pipe

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click
    HERE to participate the survey.

  • RELEVANCY SCORE 2.94

    DB:2.94:Function Silently Fails On 64-Bit Powershell 1.0, Runs As Expected 32-Bit Powershell 1.0 x7


    Is there something I do not know about PowerShell configuration and running a script? The following behavior seems dangerous to me:
    64bit PowerShell v1.0: %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
    and
    32bit PowerShell v1.0: %SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe

    function BackupDatabases
    {
    param ($server, $database_name, $username, $password)
    Write-Host command: , $command
    Write-Host Server: , $server
    Write-Host Server: $server
    Write-Host Username: , $username
    Write-Host Username: $username
    [System.Console]::ForegroundColor = [System.ConsoleColor]::Green
    sqlcmd -U $username -P $password -S $server -d master -i C:\Scripts\BackupDatabases.sql
    [System.Console]::ForegroundColor = [System.ConsoleColor]::White
    }

    DB:2.94:Function Silently Fails On 64-Bit Powershell 1.0, Runs As Expected 32-Bit Powershell 1.0 x7

    Running x64 PowerShell console I do not have this issue. If you're unable to execute sqlcmd from x64 then it is a likely a path problem. First determine where sqlcmd is located from x86 PowerShell:
    get-command sqlcmd
    Next from x64 PowerShell console take a look at your environmental path variable:
    $env:PATH -split ;
    More than likely the path which you are calling sqlcmd isn't defined or you are in the directory where sqlcmd is located in x86.

  • RELEVANCY SCORE 2.94

    DB:2.94:Script To Adjust Number Of Instances In Azure 97


    Hi,

    Right now, I have an Azure application with 2 instances published in Azure.
    I would like to have this Azure application with 2 instances on office hours and with 1 instances on non-office hours. My Azure app is rarely used during non-office hours, so it is not necessary to have 2 instances.

    Is there a way to achieve this?

    Regards, Leonard

    DB:2.94:Script To Adjust Number Of Instances In Azure 97

    Additionally, just want to refer you to thedemos and guidance on the Autoscaling Application Block (Wasabi):
    - Wasabi page on
    MSDN
    - How to on WA
    -
    Developer’s Guide
    - Demos and videos:

    CloudCover Show Episode 74 - Autoscaling
    Energy Efficient Cloud Computing for Developers
    Windows
    Azure App Scaling to Need

  • RELEVANCY SCORE 2.93

    DB:2.93:Unofficial Powershell Faq zj


    Q1: What is this FAQ? A1: My contribution to the OpsMgr community.  It will be updated at an irregular basis.
    Q2: What is this forum? A2: To provide support for Microsoft Windows PowerShell, Connectors and the SDK service in Microsoft System Center Operations Manager 2007.
    Q3: What is PowerShell? A3: PowerShell is Microsoft's next-generation command-line scripting and automation environment.  Version 1 was released in November 2006.
    Q4: How is PowerShell used in OpsMgr? A4: PowerShell uses the OpsMgr SDK to provide cmdlets that can do certain OpsMgr tasks.  There are also packaged PowerShell scripts that use these cmdlets for additional functionality.  Within OpsMgr 2007 (RTM and SP1), a custom PowerShell console has been created named Command Shell, which is basically a PowerShell console that automatically loads all of the OpsMgr PowerShell extensions.  In OpsMgr 2007 R2, this has been renamed to Operations Manager Shell.
    Q5: Why was PowerShell support added? A5: Because all server products are supposed to have a scripting interface of some sorts and PowerShell is basically a new scripting standard at Microsoft as of their 2009 fiscal year (starting mid-2008).
    Q6: What version of PowerShell is used? A6: PowerShell version 1 is used on OpsMgr 2007 (RTM/SP1/R2).  A preview release of PowerShell v2 is available, but not supported in production environments, and not tested against OpsMgr 2007.
    Q7: Are there any performance issues when using PowerShell scripts? A7: What happens is that basically every PowerShell script that is run, a new PowerShell process (powershell.exe, aka PowerShell runspace) is started up to run this particular script.  A PowerShell process can use anywhere from 10MB to much more depending on what is being done.  So if there's a chance that the particular script may be run very often, PowerShell scripts may not be the best approach depending on the circumstances.  OpsMgr 2007 R2 has improvements that should address some of these issues.
    Q8: How can I use the PowerShell extensions in a default PowerShell session or from a remote machine? A8: This implies that you're not using the OpsMgr shortcut to start the Command Shell.  The easiest way is to simply use the OpsMgr installationD VD and load only the administration tools (Command Shell or Operations Manager Shell) on the local machine.  This will require: PowerShell v1 is installed and the .NET 3.0 Framework.
    Q9: Are there any plans to improve/expand PowerShell support in OpsMgr 2007 R2? A9: At this point, it appears that there aren't any changes as far as more PowerShell commands in R2, but there are plans for improved performance with running PowerShell scripts.
    Q10: I want to learn more about the Command Shell in OpsMgr 2007. A10: Check these references for scripts, videos, blogs, etc (this is not a complete list of all available resources):      -http://marcoshaw.blogspot.com/search/label/opsmgr      -http://www.systemcenterforum.org/      -http://www.pavleck.net      -http://blogs.technet.com/stefan_stranger/      -http://blogs.msdn.com/scshell/      -http://blogs.technet.com/brianwren/      -[ADVANCED]http://blogs.msdn.com/boris_yanushpolsky/
    Q11: I want to learn more about PowerShell. A11: There's some very good books on PowerShell.  Check your favorite online book site and look for Windows PowerShell or PowerShell.  The book best suited for your particular skill level and needs may vary.
    Q12: How can I contribute to this FAQ? A12: Simply reply to this message and leave your comments (additions, corrections, etc).  They will be added to the next version of the FAQ.
    History (YYYY-MM-DD): 2009.04.26: -Edited Q2/A2, Q12/A122008.12.05: -Edited Q2/A2, Q4/A4.                   -Moved Q7/A7, Q8/A8, Q9/A9 to Q10/A10, Q11/A11, Q12/A12 respectively.                   -Added new Q7/A7, Q8/A8, Q9/A9                   -Updated Q10/A10. 2008.10.11: -Changed the order of this history to descending chronological order.                   -Added Q6/A6,Q7/A7,Q8/A8,Q9/A9. 2008.09.25: Added Q1/A1,Q2/A2,Q3/A3,Q4/A4,Q5/A5. 2008.08.05: Introduction.
     

    DB:2.93:Unofficial Powershell Faq zj

    Good question.  You can run your PowerShell scripts both on the agent or on the server.  You still need to have the PowerShell engine installed though. In R2, you get better support for PowerShell via a new custom host (and modules). I've not gone searching if Microsoft has released any public documentation on this yet.

  • RELEVANCY SCORE 2.93

    DB:2.93:Sharepoint 2013 Dev Environment As Standalone With Dc - Powershell In Azure? ss


    Hi,

    I am looking for a PowerShell script that create based on a Visual Studio 2013 Azure image a dev environment in azure. I need a Standalone server with DC / SQL / SharePoint 2013 on one server.
    Provide Microsoft a script for this requirement?

    Regards,

    DB:2.93:Sharepoint 2013 Dev Environment As Standalone With Dc - Powershell In Azure? ss


    Thanks Trevor!

    I know that Microsoft doesn't support that comfortable dev environment on a single machine but it just works :)
    The only reason is that isn't good on productive environment.
    Thanks for the links!
    Does anyone have some more interesting links for this issue?

  • RELEVANCY SCORE 2.93

    DB:2.93:Add-Azureaccount Does Not Work With Fips-Compliant Machines zk


    Hello,
    Recently we implemented a GPO which enforces FIPS compliance to our domain computers (System Cryptography: Use FIPS compliant algorithmspolicy). One drawback I've noticed is that the
    Add-AzureAccount PowerShell command does not work anymore to authenticate an Azure PowerShell session to our Azure subscription. The error generated is Exception has been thrown by the target of an invocation: This implementation
    is not part of the Windows Platform FIPS validated cryptographic algorithms. This is problem, as you effectively cannot interact with your Azure environment unless you can authenticate. I've tried importing an Azure publish settings
    file (Import-AzurePublishSettingsFile), but this does not authenticate me.
    Is there a way to authenticate on Azure PowerShell on FIPS compliant boxes?
    Thanks,
    David

    DB:2.93:Add-Azureaccount Does Not Work With Fips-Compliant Machines zk

    Hello,
    Recently we implemented a GPO which enforces FIPS compliance to our domain computers (System Cryptography: Use FIPS compliant algorithmspolicy). One drawback I've noticed is that the
    Add-AzureAccount PowerShell command does not work anymore to authenticate an Azure PowerShell session to our Azure subscription. The error generated is Exception has been thrown by the target of an invocation: This implementation
    is not part of the Windows Platform FIPS validated cryptographic algorithms. This is problem, as you effectively cannot interact with your Azure environment unless you can authenticate. I've tried importing an Azure publish settings
    file (Import-AzurePublishSettingsFile), but this does not authenticate me.
    Is there a way to authenticate on Azure PowerShell on FIPS compliant boxes?
    Thanks,
    David

  • RELEVANCY SCORE 2.93

    DB:2.93:Calling Powershell With Wshshell.Exec() Method Hangs The Script. p9



    I am trying to call Powershell with the Exec method of the WshShell object. I am writing the script in JScript, but I have reproduced the problem in VBScript as well. Both of the following short test scripts will cause WSH to hang indefinitely:

    test.js
    var shell = new ActiveXObject(WScript.Shell);
    WScript.Echo(shell.exec('powershell -noninteractive -noprofile -Command { echo Hello_World ; Exit }').StdOut.ReadAll());

    test.vbs:
    dim shell

    set shell = CreateObject(WScript.Shell)
    WScript.Echo shell.exec(powershell -noninteractive -noprofile -Command { echo Hello_World ; Exit }).StdOut.ReadAll

    Am I doing something wrong, or am I running into or a limitation/incompatibility? The Run method works very well, but I need to capture output, which it's not capable
    of doing.My platform is
    Windows XP with PowerShell v1. I've tested
    on Windows 7 Pro, 64-bitwith
    PowerShell v3as well.

    DB:2.93:Calling Powershell With Wshshell.Exec() Method Hangs The Script. p9

    Hi,
    You may be running into the deadlock condition described here:
    http://support.microsoft.com/kb/960246
    To avoid this condition, I recommend writing a temporary .cmd file that executes your command and redirects its output to a temporary file, and then read the contents of the temporary file. You can run the temporary script using WshShell.Run. This also gives
    you the ability to run the .cmd script in a hidden window.
    Bill

  • RELEVANCY SCORE 2.93

    DB:2.93:Deploy To Azure Storage From Vso With Powershell cp


    Greetings,
    Is it possible to use PowerShell to deploy from VSO and/orview the file system that VSO stores the code in?
    Recently we have moved our source from a Local TFS to TFService / Visual Studio Online. On the Local TFS we had a PowerShell script that would deploy the application to Azure Blob.
    This is the body of what the script did

    Create a staging/temporary folder, Copy the bin directory after the build, Create a txt file that pulled the version # from the AssemblyInfo.CS file on the build agent (which the customer application would check to see if it needs to update)Create a .sql file that also pulled the version # from the AssemblyInfo.CS file (which updates the customers DB)Zips the copied bin andthe created .sql togetherUploads the Zip and the txt to Azure Blob
    We want to continue to use this script to deploy with while on VSO but the current issue is that I'm running blind on the file paths. I reviewed the build log and found C:\a\src and C:\a\bin, which is a start. I've also been able to run simple commands such
    as dir/mkdir after the build without errors coming back which I'm assuming means I can manipulate the file system VSO uses to some degree at least.

    DB:2.93:Deploy To Azure Storage From Vso With Powershell cp

    Hi
    PhilWolf91,
    Since this thread is more related to TFS deployment to Azure, I will move it to the right forum for a better response. Thanks for your understanding.

    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click
    HERE to participate the survey.

  • RELEVANCY SCORE 2.93

    DB:2.93:Powershell 3.0 Is Broken On My Windows 8 Machine 77


    I'm running powershell 3 on Windows 8. It was working fine until yesterday. Now I can't use any cmdlet or other commands. Every single time I get a X is not recognized as the name of a cmdlet, function, script file, or operable program. If I
    run powershell with the -v 2 switch it seems to function allright, but many of the new cmdlets, for Active Directory for instance, are not available.
    I've logged out and back in and rebooted my machine. Nothing works. Is there any way of reinstalling Powershell 3.

  • RELEVANCY SCORE 2.93

    DB:2.93:Ways To Start Powercli Remotely Not Using Powershell c9



    Is there any way to start a PowerCLI script on a server remotely from another windows box where PowerShell is not installed?

    DB:2.93:Ways To Start Powercli Remotely Not Using Powershell c9


    Hi,

    Above mentioned PSEXEC by our friends is more than sufficient to shoot a command which executes ps on remote server,

    1. download the psexec from Internet and execute it.

    Regards

    Raj

    banavalg@yahoo.com

  • RELEVANCY SCORE 2.92

    DB:2.92:How Can I Use Azure Cmdlets In Scom Management Pack Scripts cz


    i want to show some of azure web site metrics in the scom console so i have script which gets the data from azure portal
    how can i use that script in the scom management pack
    [void][system.reflection.Assembly]::LoadFrom(“C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Automation\Microsoft.WindowsAzure.Common.dll”)
    $value=Get-AzureWebsiteMetric -Name openemrmysql -MetricNames Http2xx -TimeGrain PT1M
    $API = New-Object -ComObject MOM.ScriptAPI
    $PropertyBag = $API.CreatePropertyBag()
    $result=$value.Data.Values
    foreach($result in $value)
    {
    $global:totalvalue=$result.value.Total -as [int]



    }
    $PropertyBag.AddValue(AzureActive,AzureActive)
    $PropertyBag.AddValue(Active, $global:value)
    $PropertyBag

    i have included this script in the management pack and it is not creating any counter in the scom console.
    Can any one help me,

    thanks Regards,
    Suresh Gaddam

    DB:2.92:How Can I Use Azure Cmdlets In Scom Management Pack Scripts cz

    I see. if you are unable to use the WAP MP, then I would use what I mentioned above (this link)
    and see if that applies to your scenario.
    from what I can see, I am not seeing many out of the box features that can help us here.

    sorry and hope this helps!
    Jose

  • RELEVANCY SCORE 2.92

    DB:2.92:Ssdt (Vs2010) Sql Project Deployment To Azure Using Certificates j1


    Greetings,
    Currently I have a working setup to build and generate the diff script (sql publish script) via TFS2010 and SSDT *.sqlproj files. I also created a powershell script to deploy the diff script to SQL Azure instance using a simple sqlcmd command.
    The requirement is to use certs to do the deployment (Just like deploying a Windows Azure application). Iam currently looking at SQL Azure cmdlets and hope to get it working via powershell using certificates.

    But my question is in order to generate the diff script, in the build template, the MSBuild call needs to connect to the SQL Azure instance. Currently I have it configured to use the publish.xml profile file as part of the project. This publish.xml file
    has the connection string (Azure instance name, UserID/Password). Butthe requirement from theIT ops team is not to use a direct connection to SQL Azure using UserID/Password.
    Is there a wayto connect to SQL Azure instance usingcertificatesto generate the diff script (At the TFS build template level)?
    All comments are appreciated!

  • RELEVANCY SCORE 2.92

    DB:2.92:[Forum Faq] Powershell Reports Error When Using Get-Azurevmimage Command kj


    Symptom:

    When using Azure PowerShell command get-AzureVMImage, we may get the following error report:

    PS C:\ get-azurevmimage VERBOSE: 2:45:42 PM - Begin Operation: Get-AzureVMImage get-azurevmimage : Requested value 'xxx' was not found. At line:1 char:1 get-azurevmimage
    ~~~~~~~~~~~~~~~~ CategoryInfo : NotSpecified: (:) [Get-AzureVMImage], ArgumentException FullyQualifiedErrorId :

    System.ArgumentException,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepository.GetAzureVMImage

    This error means the Azure PowerShell is not able to query the azure image repository.

    Cause:

    This issue could be caused the PowerShell version is not the latest version.

    Solution:

    1. Using the command:
    (Get-Module Azure).Version to get the Azure PowerShell version.

    2. Go to the Azure PowerShell website to update Azure PowerShell or reinstall it.
    http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/

    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    DB:2.92:[Forum Faq] Powershell Reports Error When Using Get-Azurevmimage Command kj

    Symptom:

    When using Azure PowerShell command get-AzureVMImage, we may get the following error report:

    PS C:\ get-azurevmimage VERBOSE: 2:45:42 PM - Begin Operation: Get-AzureVMImage get-azurevmimage : Requested value 'xxx' was not found. At line:1 char:1 get-azurevmimage
    ~~~~~~~~~~~~~~~~ CategoryInfo : NotSpecified: (:) [Get-AzureVMImage], ArgumentException FullyQualifiedErrorId :

    System.ArgumentException,Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.DiskRepository.GetAzureVMImage

    This error means the Azure PowerShell is not able to query the azure image repository.

    Cause:

    This issue could be caused the PowerShell version is not the latest version.

    Solution:

    1. Using the command:
    (Get-Module Azure).Version to get the Azure PowerShell version.

    2. Go to the Azure PowerShell website to update Azure PowerShell or reinstall it.
    http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/

    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • RELEVANCY SCORE 2.92

    DB:2.92:Using Windows 8 Pro On Desktop (Not Server), Can I Use Azure Automation? 1z


    I am following the course Automating the Cloud with Azure automation. In the preparation for using Automation, they instruct to run Install-WindowsFeature from PowerShell. Furthermore to run Install-WindowsFeature, the
    documentation implies that the user (me) is running Windows Server 212 R2.
    My question is simple: Do you need Windows Server locally to use Azure Automation? Can I use it if I have only Windows 8 Pro?

    Colbert

    DB:2.92:Using Windows 8 Pro On Desktop (Not Server), Can I Use Azure Automation? 1z

    Hi Colbert,
    My guess is the course is telling you to install the IIS Windows feature, so you can create a certificate to use as a management cert in Azure. You can also create this cert using the makecert utility, as described

    here. This utility does not require Windows Server as far as I know.
    Just FYI - it seems the course may be a little outdated as using certificate-based auth to talk from Azure Automation to your Azure subscription is deprecated. The way we are now recommending to authenticate is

    via an Azure Active Directory OrgID credential.

  • RELEVANCY SCORE 2.92

    DB:2.92:Using Ssdt To Create And Deploy Logins, Groups And Users In Azure 3z


    Is it possible to use SSDT to automate the creation and deployment of LOGINs, USERs and GROUPs in SQL Azure, in such a way that future incremental deployments also work?
    If so, any tips/pointers would be appreciated. The obvious approach (running a series of CREATE LOGIN and CREATE USER commands, and so on, from a PreDeployment script), which I've used before for a local SQL 2012 DB, doesn't seem to work.
    If not, then what's the best way to store and execute a script for this purpose? I realize I could use PowerShell, but I'd *really* like to avoid that. In order to support automated builds and continuous integration, this needs to happen within the Visual
    Studio build process.
    Thanks!

    Check out my book:
    Ultra-fast ASP.NET: Building Ultra-Fast and Ultra-Scalable Websites using ASP.NET and SQL Server

    DB:2.92:Using Ssdt To Create And Deploy Logins, Groups And Users In Azure 3z

    Hello,
    I didn't find any other ways except defining post deployment scripts in SSDT. In order to meet your requirement about use the scripts in different deployment environment, you can try to utilizing thepost deployment scripts with SQLCMD variables.
    The following thread is about similar requirement, please refer to:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bd0d8800-5fe5-439a-8726-e7895a49624f/best-practices-for-deploying-storing-logins-users-roles-in-ssdt?forum=ssdt
    Reference:Use sqlcmd with Scripting Variables
    Regards,
    Fanny Liu Fanny Liu

    TechNet Community Support

  • RELEVANCY SCORE 2.92

    DB:2.92:Pricing And Experience Of High Availability And Disaster Recovery In Sql Azure fk


    Our SQL Azure database is growing in size. In terms of database backups, up until now we have gone down the data-tier application export method, using Powershell to produce BACPAC files (http://fabriccontroller.net/blog/posts/backup-and-restore-your-sql-azure-database-using-powershell/).
    Our Powershell script is scheduled to run every night, and also manages BACPAC file retention by deleting files older than X days.

    We would like to look into the High Availability and Disaster Recovery options that Windows Azure appears to provide (http://msdn.microsoft.com/en-us/library/jj870962.aspx), so we can potentially have a live standby database to failover to. However, we cannot
    find any pricing information relating to this. We have tried the Azure Pricing Calculator pages (http://www.windowsazure.com/en-us/pricing/calculator/) however HADR does not appear to be listed here.
    Does anyone please know where we can find pricing information for HADR for SQL Azure? In addition, any feedback you may have on HADR for Azure would be helpful. We have recently had downtime of our Live application due to Microsoft carrying out routine maintenance,
    which has hardly been ideal. It would be useful to be able to guarantee 100% uptime without maintance issues.

    DB:2.92:Pricing And Experience Of High Availability And Disaster Recovery In Sql Azure fk

    Hi Dilkush,
    Thank you, yes you are right. It appears this is SQL Server on Windows Azure VM's, which does not apply to us at present.

    Thanks for your help.

  • RELEVANCY SCORE 2.92

    DB:2.92:How Powershell Activity Executes Script In Target Machines In Orchestration? 1x



    I have tested powershell commands in orchestration but it is not running actual target machines. Behalf of that it is running on machine where MID server installed and taking remote of PSSession and running.

    But for SSH it is executing on target machines directly.

    Please suggest me it's working principle and if my understanding is correct ?

    DB:2.92:How Powershell Activity Executes Script In Target Machines In Orchestration? 1x


    The hostname for the target machine serves two purposes:
    Hostname automatically translates to $computer in your PS commandsHostname helps to identify which MID Server to use for the Orchestration activity

  • RELEVANCY SCORE 2.91

    DB:2.91:Creating Websites Using Management Api, Name Conflicts 83


    Hi,
    we use Azure Websiteswith Visual Studio Online continuous deployment integration. We use the default build process template, which was provided by Azure. During the build we run integration tests, so we have added two PowerShell scripts before and
    after runningtests to the build process to set up and destruct a new environment in Azure dedicated for our integration test session.
    Our script looks like the following:
    $sessionId = Get-Random
    $websiteName = product-$sessionId
    New-AzureWebsite $websiteName -Location WestEurope
    Our unique product name has been substituted to product.
    We are using this process for a few weeks, but today was the second time we got an error:

    New-AzureWebsite : Conflict: Website with given name product-1945359429 already exists.

    It was the very first build today, so there were no other already running tests before (I have double checked on the management portal that no resources exists)and we do not understand how could match a random number in ~50 builds during the past weeks.
    So, the questions are:
    - Can we get this kind of response any other way than having matching website names?
    - Is this some kind of a bugand we had to retry the request if we got a falseconflict?
    - Are the numbers really match?
    - Does anyone know how could we pass the number of the build or the changeset to the PowerShell script in the defaultTfvcContinuousDeploymentTemplate.12.xamlbuild process template?
    - Any other ideas?

    Thank you.

    (Feedback for the MSDN forums: this editor is completely unusable)

    DB:2.91:Creating Websites Using Management Api, Name Conflicts 83

    Hi Peter,
    Thanks for you feedback.
    Did you try to run your script on Azure Powershell separately? I tested your code on powershell, it worked fine.

    Any results, please let me know.
    Regards,
    WillWe are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click
    HERE to participate the survey.

  • RELEVANCY SCORE 2.91

    DB:2.91:Unable To Find Type [Microsoft.Windowsazure.Cloudstorageaccount]: Make Sure That The Assembly Containing This Type Is Loaded. f1


    Exploring the broad capabilities of Windows Azure I've installed the Windows Azure Training Kit (WATK) inclusinf some components like Windows Azure PowerShell, Authoring Tools, Libraries for .Net and more. I'm running Windows Server 2012 and VS2012 Professional.
    During the Migrating Web Farm demo I get stuck on step 6.
    From an elevated prompt run the Setup-2.Azure.cmd script to create the starter virtual machines for this demo.

    Previous steps like modifying the azure.config.xml and copied the VHD's to the storage accountas part of the
    Setup-1.Azure.cmd script successfully.
    Based on this
    thread I changed the assembly to Microsoft.WindowsAzure.Storage.CloudStorageAccount
    but still no joy :-(

    From what I understand there might be some version mismatch between solution and incompatible library.

    As an ITpro this feels like a bit inconvenient as this is clearly not (yet) my comfort zone :-) Hopefully someone can provide me some pointers getting on the right track. Thanks!

    Ronny de Jong | inovativ.nl | Blog: donnystyle.wordpress.com | Twitter: twitter.com/ronnydejong

    DB:2.91:Unable To Find Type [Microsoft.Windowsazure.Cloudstorageaccount]: Make Sure That The Assembly Containing This Type Is Loaded. f1

    Hi,
    The training kit is using VM, so please open case to VM forum in IaaS:
    http://social.msdn.microsoft.com/Forums/en-US/WAVirtualMachinesVirtualNetwork/threads
    For VM I cannot test with it. I guess this tutorial needs storage account, a serviceand VM in the Azure. Have you done it? If so, check you input the right parameters in the cmd.
    Thanks,QinDian Tang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • RELEVANCY SCORE 2.91

    DB:2.91:Azure Integration Limitation With System Center 2012 Orchestrator Sp1 z7


    Hello,
    This may need to be moved to the System Center 2012 forums but it's specifically related to Azure so I thought I'd post it here first. I've been working with System Center 2012 Orchestrator SP1 in an effort to harness the ability of managing Azure with runbooks.
    While the integration pack for Azure is interesting and provides some basic ability - the true value I see is in the ability to call Azure PowerShell Cmdlets. However, System Center 2012 Orchestrator SP1 calls PowerShell 2.0 rather than PowerShell 3.0 when
    running a script which is required by the Windows Azure PowerShell Cmdlets. I found a blog article which stated that someone found a workaround (hack) to get around it by calling a sub-routine.
    As an example - this PowerShell script will work in a runbook because I'm enabling a subroutine, which forces the use of PowerShell 3.0 - even though every other part of the script is run in PowerShell 2.0:
    (Note: This is not the best code - I whipped it up in a few minutes just to prove a point. I certainly am not representing that this is something I would put in production (i.e. it's missing for each, correct array placement, etc.)
    $StorageAccount = Powershell {
    Import-Module Azure
    Import-AzurePublishSettingsFile F:\PublishSettings\credentials.publishsettings
    Select-AzureSubscription -SubscriptionName NimboDev
    $storage = Get-AzureStorageAccount
    function AccountList
    {
    function One
    {
    $LabelOne = $storage[0].Label
    $LocationOne = $storage[0].Location
    $AffinityOne = $storage[0].AffinityGroup
    return $LabelOne, $LocationOne, $AffinityOne
    }
    $VarOne = One
    function Two
    {
    $LabelTwo = $storage[1].Label
    $LocationTwo = $storage[1].Location
    $AffinityTwo =$storage[1].AffinityGroup
    return $LabelTwo, $LocationTwo, $AffinityTwo
    }
    $VarTwo = Two
    function Three
    {
    $LabelOne = $storage[2].Label
    $LocationOne = $storage[2].Location
    $AffinityOne = $storage[2].AffinityGroup
    return $LabelOne, $LocationOne, $AffinityOne
    }
    $VarThree = Three
    function Four
    {
    $LabelTwo = $storage[3].Label
    $LocationTwo = $storage[3].Location
    $AffinityTwo =$storage[3].AffinityGroup
    return $LabelTwo, $LocationTwo, $AffinityTwo
    }
    $VarFour = Four
    return $VarOne[0], $VarOne[1], $VarOne[2],$VarTwo[0], $VarTwo[1], $VarTwo[2], $VarThree[0], $VarThree[1], $VarThree[2], $VarFour[0], $VarFour[1], $VarFour[2]
    }
    return AccountList
    }
    $StorageAccount[0]
    $StorageAccount[1]
    $StorageAccount[2]
    $StorageAccount[3]
    $StorageAccount[4]
    $StorageAccount[5]
    $StorageAccount[6]
    $StorageAccount[7]
    $StorageAccount[8]
    $StorageAccount[9]
    $StorageAccount[10]
    $StorageAccount[11]
    The problem with all of this is that it's just so much more of a pain to create runbooks for Azure when you have to handle your PowerShell scripts using subroutines to engage the PowerShell 3.0 version. Is there any roadmap or fix for this?
    Thanks,

    -Ira Bell

    DB:2.91:Azure Integration Limitation With System Center 2012 Orchestrator Sp1 z7

    QinDian,
    Thanks for responding. Those were nice articles to read - although not related to Orchestrator as far as I can tell. I'll proactively vote for this as a new feature and hope that someone raises their hand to say that I'm just missing something!
    Here's some more info just so it's really clear where I'm having a problem:

    In System Center 2012 Orchestrator SP1, open the Runbook DesignerCreate a new RunbookUnderActivitieson the right, click System, then drag the
    Run .Net Script activity in to the designer screen.Double click the Run .Net Script activityUnder Language, click theellipsis (...) then select
    PowerShellType the following code (Note: Adjust the output path to something appropriate for your environment, such as C:\ImportError.txt - the script will fail if you try to write to a directory that doesn't exist):

    Import-Module Azure$error|out-file F:\Logs\ImportError.txtGet-AzureStorageAccount
    Click FinishOn the top menu, click Runbook TesterIn the Runbook Tester, click Run on the top menu
    Doing these steps will show the following error in the Runbook Tester:

    Also, the results in the respective text file will probably read an error similar or identical to this:
    Import-Module : The version of the loaded PowerShell is '2.0'. The module 'C:\Pr
    ogram Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\Azure.psd1' requ
    ires a minimum PowerShell version of '3.0' to execute. Please verify the install
    ation of the PowerShell and try again.

    At line:1 char:14
    Import-Module Azure
    CategoryInfo : ResourceUnavailable: (C:\Program File...zure\Azure
    .psd1:String) [Import-Module], InvalidOperationException
    FullyQualifiedErrorId : Modules_InsufficientPowerShellVersion,Microsoft.Po
    werShell.Commands.ImportModuleCommand
    I'm clear that we can call a subroutine to engage PowerShell 3.0 such as doing something like the following:
    $StorageAccount = Powershell {
    Import-Module Azure
    Import-AzurePublishSettingsFile F:\PublishSettings\credentials.publishsettings
    Select-AzureSubscription -SubscriptionName NimboDev
    $storage = Get-AzureStorageAccount
    $Label = $storage[3].Label
    return $Label
    }
    $return = $StorageAccount
    $return

    However, that's not the most elegant solution. It'd be great if we could run PowerShell 3.0 in the traditional way right from the System Center 2012 Orchestrator Runbook Designer calling aRun .Net Script activity without doing a workaround.-Ira Bell

  • RELEVANCY SCORE 2.91

    DB:2.91:Windows Azure Powershell 3m


    Hi,
    I have my sharepoint site on windows azure virtual machine, so it is possible to use powershell command on windows azure virtual machine, like we use sharepoint powershell on local machine.

    DB:2.91:Windows Azure Powershell 3m

    Hi,

    PowerShell requires you to have the Add-In loaded that corresponds the product or service you want to manage.
    In case of SharePoint, when you install SharePoint in the VM you will of course get the 14 hive as well as the so called SharePoint Management Shell, which starts a PS session with the SharePoint Add-In loaded. So you can then use PS to manage your SharePoint
    installation.
    Concerning Azure, yes, there is a package to install the Azure PowerShell, e.g. via Web Installer Platform, which then allows you to register a connection to your Azure subscription and e.g. then manage your Azure VMs via PS.
    Regards,
    Markus

  • RELEVANCY SCORE 2.91

    DB:2.91:Migrated Hyper-V Vm Not Booting On Azure md


    Hi all,
    I'm working on a project where several (40) machines have to be moved from a VMWare ESX 4.1 platform to Azure. Because of the large amounts of VM's that are being moved a bit of automation is required.
    I've got some powershell scripting in place which will do a few things sequentially
    1. Migrate the VM from VMWare to Hyper-V 2012 using the New-SCV2V cmdlet from Virtual Machine Manager 2012
    2. Store the migrated VM in the VMM library
    3. Move the VHD's (usually 2, 1 OS and 1 data disk) to Azure and create disks
    4. Create a new VM in Azure using the uploaded disks.
    The problems I'm having now is that the migrated VM's will boot up on the Hyper-V platform but not in Azure. The VM in Azure will start and display as 'Running' in the Azure portal, but I can't connect to the VM using RDP (pinging the machinedoesn't
    work either).
    I've booted the VM on Hyper-V without problems, logging on works as well (through the VM consoleand RDP), I've installed the latest (Hyper-V 2012) integration services on the VM. But as far as I know there is no real way of troubleshooting an unresponsive
    VM on the Azure platform.
    Any hints or tips?

    DB:2.91:Migrated Hyper-V Vm Not Booting On Azure md

    Eventually it was an issue with a KB article which had to be deployed to the machine:
    http://support.microsoft.com/kb/2800789

  • RELEVANCY SCORE 2.90

    DB:2.90:Possible To Use Azure Cmdlets In Pshell Webjob? kz


    Hi,
    I have the msdn sub azure credits that seem to run out every month because I forget to shut down my dev VMs overnight every now and again.
    I initially thought of having a constantly running A0 VM and schedule them from there, but read about the powershell capable webjobs that come with a free website and thought that would be a better option but i can't get them to work

    [10/22/2014 03:22:21 a834c4: SYS INFO] Status changed to Initializing
    [10/22/2014 03:22:22 a834c4: SYS INFO] Run script 'azuretest.ps1' with script host - 'PowerShellScriptHost'
    [10/22/2014 03:22:22 a834c4: SYS INFO] Status changed to Running
    [10/22/2014 03:22:23 a834c4: ERR ] get-azuresubscription : The term 'get-azuresubscription' is not recognized as

    [10/22/2014 03:22:23 a834c4: ERR ] the name of a cmdlet, function, script file, or operable program. Check the

    [10/22/2014 03:22:23 a834c4: ERR ] spelling of the name, or if a path was included, verify that the path is

    [10/22/2014 03:22:23 a834c4: ERR ] correct and try again.
    The above is running get-azuresubscription, so obviously by default a webjob doesn't have access to the azure cmdlets
    1. Can a webjob execute azure cmdlets? What's the path to the Azure.psd1 file?
    2. Does the webjob run in a scope that has visilibity over my subscription and access to turn on/turn off VMs?
    Not really interested in rolling my own c# webapp, i'll happily install one if someone out there has done it already... otherwise i'll probably go back to having a A0 VM running 24x7 to make sure my VMs are off overnight.

    Jakub @ Adelaide, Australia

    DB:2.90:Possible To Use Azure Cmdlets In Pshell Webjob? kz

    Hi,
    Yes you can use the new azure automation feature and check, here is the link:
    http://blogs.technet.com/b/keithmayer/archive/2014/09/17/step-by-step-getting-started-with-windows-azure-automation.aspx
    Regards,
    Azam Khan

  • RELEVANCY SCORE 2.90

    DB:2.90:Value Cannot Be Null. Parameter Name: Subscriptionid. Although Its Not Empty dm


    Hello,
    I have an issue when i call a powershell script from asp.net website. Although the script runs successfully when i open azure powershell CLI.
    The error is:
    Import-AzurePublishSettingsFile MyPublishSettingsFilePath
    CategoryInfo : CloseError: (:) [Import-AzurePublishSettingsFile], CryptographicException
    FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.ImportAzurePublishSettingsCommand

    System.ArgumentNullException: Value cannot be null.
    Parameter name: subscriptionId

    BTW, I run Get-AzureSubscription command on azure powershell CLI and i could see that there're a SubscriptionName and SubscriptionID.
    Any ideas?
    Thanks in advance,
    Marwa Ahmad

    DB:2.90:Value Cannot Be Null. Parameter Name: Subscriptionid. Although Its Not Empty dm

    Hello,
    The credentials.publishsettings file exists and accessible as well.
    any ideas?

    best regards

  • RELEVANCY SCORE 2.90

    DB:2.90:Azure Power Shell - Says Successfully Installed But Does Not Show Up 7j


    Hi,
    I have been trying to install the latest Azure PowerShell in vain. The web installer states that the installation is successful but on going into Programs under Microsoft Azure, I do not see the link to Azure Powershell - even tried searching on Power,
    Azure etc but could not see this anywhere. I see the Azzure Authoring Tolls 2.4.1, Azure Compute Emulator - v2.4, Microsoft Azure Libraries for .NET - v2.5.1, Azure Storage Tools - v2.5.1 and Azure Storage Emulator v3.3 all installed including the Azure
    Command Prompt Microsoft .NET Framework 4.5 and Microsoft .NET Framework 4.5 SDK are also installed successfully.
    There is also a SQL Express 2012 Local DB installed.
    I do not have Visual Studio.
    I have Windows 7 Enterprise Edition 64 bit OS.
    Tried going into Windows Powershell and trying to a import of Azure module - says unrecognized.
    Windows PowerShell shows Execution Policy as restricted (not sure if this matters) - unable to change this since regediting is disabled.
    Could someone please guide on what I am missing. Thanks.

    DB:2.90:Azure Power Shell - Says Successfully Installed But Does Not Show Up 7j

    Hi,
    If the download and installation is successful, you can find the related libraries and modules at C:\Program Files\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure. Then try to import the Azure.psd1 into your powershell ise or powershell. In my PC
    it is installed as Microsoft Azure PowerShell. But I imported the Azure PowerShell module into my Windows PowerShell and it is working fine. Try to import the modules as below in windows PowerShell ISE or Console
    Import-Module C:\Program Files\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1

    Thanks and Regards
    Bhaskar.D

  • RELEVANCY SCORE 2.90

    DB:2.90:Running Powershell Script For Iis 91


    HiI have a Powershell  script for IIS that I want run. I start the IIS Powershell console as administrator. Then run the commandset-executionpolicy unrestrictedafter that I right click on my script file and choose copy Copy as Path and paste it into Powershell. When the script run no error but the settings in the script are not applied. What am I missing here.I have IIS Powershell installed. running Win2008 Sp2. If I manually run each line in the script everything is working. Regards

    Ulf Mansson
    MCT, MCSE
    www.lumagate.com

    DB:2.90:Running Powershell Script For Iis 91

    Hi, Glad to hear the information is useful. If you have more questions in the future, you’re welcomed to this forum. Thanks. This posting is provided AS IS with no warranties, and confers no rights.

  • RELEVANCY SCORE 2.90

    DB:2.90:Get-Azurestorageblob : Resourcenotfound: The Resource Service Name Storageservices Is Not Supported. j9


    Hello,
    I've had a script for the last few weeks working on 2 servers, I've been trying to get it working on another server and as soon as it hits the below code which trys to execute 'Get-AzureStorageBlob' I get the below error message.
    Set-AzureSubscription -SubscriptionName $Subscription -CurrentStorageAccountName $StorageAccountName$StorageContainers = @(full,diff,log)
    foreach($Container in $StorageContainers) {
    $Files = Get-AzureStorageBlob -Container $Container
    foreach ($file in $Files) {
    Remove-AzureStorageBlob -Container $Container -Blob $file.Name
    }
    }

    Get-AzureStorageBlob : ResourceNotFound: The resource service name storageservices is not supported.
    At C:\Scripts\ClusterToAzureMaintenance.ps1:33 char:24
    $BackupFiles = Get-AzureStorageBlob -Container $Container
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo : CloseError: (:) [Get-AzureStorageBlob], CloudException
    FullyQualifiedErrorId : CloudException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageBlobCommand

    The Azure functions are working within powershell and list all functions available.
    The code is an exact copy/paste, all servers are running as an azure VM. The only thing I can find is that the new server has a later version of Azure PowerShell installed - 0.8.4 whereas the other servers are running version: 0.7.1
    Anyone seen this before?
    Marcus

    DB:2.90:Get-Azurestorageblob : Resourcenotfound: The Resource Service Name Storageservices Is Not Supported. j9

    Hi Marcus ,
    I'm afraid this is beyond what I can support .
    Maybe you can get accurate assistance from following azureforum:
    http://social.msdn.microsoft.com/Forums/windowsazure/en-US/home?category=windowsazureplatform%2Cazuremarketplace%2Cwindowsazureplatformctp
    Best Regards
    Elton JiWe
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.