Hyper-V BPA Automation with Powershell

"draft" version of simple powershell script for Hyper-V BPA automation
I'm not a pro in PS. I'll be happy to hear your comments and advices
Anyway, I hope it will be useful for somebody. 
http://rlevchenko.com/2014/05/02/hyper-v-bpa-automation-with-powershell/
Roman Levchenko, MCSA, MCITP, MCTS http://www.rlevchenko.com

Hi ,
I am not familiar with powershell .
#create Backup Path of the Day
$path = new-item -ItemType Directory -Path "$rootPath\$(Get-Date -f yy_MM_dd_HH-mm)"
I think it will create a new folder to store the export image when the script start to run .
Also the disk space for storing these image is a factor what you can think of .
Best Regards
Elton Ji
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.

Similar Messages

  • Create Hyper-V Virtual Machines with Windows PowerShell searching on hostname

    Dear,
    I’m a starter with PowerShell scripting an I’m looking for a script to create Hyper-V Virtual Machines with Windows PowerShell. The idea behind the script is that when I run the script its first searching for the hostname. I’m migrating 24 locations and each
    location have a different hostname like xxx-SRV001. The script needs to use the first 3 signs from the hostname in this case “xxx” and create 2 VM's with below info:
    Virtual Machine 1 2048MB
    Virtual Machine 2 4096MB
    Location D:\VM\
    I can create VM's with Powershell into Hyper-V so only a script to first searching for the first 3 characters of the hostname is enough.
    Example:
    It's the intention that when the script runs it's looking for the hostname. As example we have hostname 000-SRV001
    If the script see the first 3 characters of the hostname, in this case 000 he need to create 2 VMs with name xxx-SRV002 and xxx-SRV004
    I think it must be something with 
    $hostname = "Get-WmiObject -computername $Machine Win32_Computersystem"
    But then when i'm asking for $hostname he must give me back the hostname and if the hostname is 1 of the 24 locations then he need to create 2 vm's in Hyper-V with above info.
    Can you help me or do you have a script for this? 

    Juste use :
    $vram = 1GB*$vRam
    You not need the "
    Do you have any error with the creation of the VM?
    # Variables
    $VMName = Import-Csv "C:\HyperV\input.csv"
    $VHD = 40GB
    $VMLOC = "C:\HyperV"
    $vSwitch = "External"
    $ISO = "C:\ISO\WinServer2012R2.iso"
    $LocationCode = $env:COMPUTERNAME.Split("-")[0]
    # Create VM Folder
    MD $VMLOC -ErrorAction SilentlyContinue
    Foreach ($VM in $VMNames)
    $Name = $VM.name
    [int64]$vRam = $vm.vram
    $vram = 1GB*$vRam
    $VMName = $LocationCode+$Name
    # Create Virtual Machine
    New-VM -Name $VMName -Path $VMLOC -MemoryStartupBytes $vRam -NewVHDPath "$VMLOC\$VMName\Virtual Harddisks\$VMName.vhdx" -NewVHDSizeBytes $VHD -SwitchName $vSwitch
    # Configure Virtual Machines
    Set-VMDvdDrive -VMName $VMName -Path $ISO
    Start-VM $VMName
    # Configure Virtual Machines
    Set-VMDvdDrive -VMName $VMName -Path $ISO
    Start-VM $VMName
    Error message 
    New-VM : '003' failed to modify device 'Memory'. (Virtual machine ID 8F5F32D7-F1A0-4A68-8B01-CA6661869A1E)
    Invalid startup memory amount assigned for '003'. The minimum amount of memory you can assign to this virtual machine is '32' MB. (Virtual machine ID 8F5F32D7-F1A0-4A68-8B01-CA6661869A1E)
    A parameter that is not valid was passed to the operation.
    At line:20 char:5
    + New-VM -Name $VMName -Path $VMLOC -MemoryStartupBytes $vRam -NewVHDPath "$VM ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (Microsoft.HyperV.PowerShell.VMTask:VMTask) [New-VM], VirtualizationOperationFailedException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.NewVMCommand
    Set-VMDvdDrive : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:23 char:5
    + Set-VMDvdDrive -VMName $VMName -Path $ISO
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Set-VMDvdDrive], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.SetVMDvdDriveCommand
    Start-VM : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:24 char:5
    + Start-VM $VMName
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Start-VM], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.StartVMCommand
    Set-VMDvdDrive : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:27 char:5
    + Set-VMDvdDrive -VMName $VMName -Path $ISO
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Set-VMDvdDrive], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.SetVMDvdDriveCommand
    Start-VM : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:28 char:5
    + Start-VM $VMName
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Start-VM], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.StartVMCommand
    New-VM : '003' failed to modify device 'Memory'. (Virtual machine ID C0FC835E-36D4-462E-BD21-69A75A808E2F)
    Invalid startup memory amount assigned for '003'. The minimum amount of memory you can assign to this virtual machine is '32' MB. (Virtual machine ID C0FC835E-36D4-462E-BD21-69A75A808E2F)
    A parameter that is not valid was passed to the operation.
    At line:20 char:5
    + New-VM -Name $VMName -Path $VMLOC -MemoryStartupBytes $vRam -NewVHDPath "$VM ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (Microsoft.HyperV.PowerShell.VMTask:VMTask) [New-VM], VirtualizationOperationFailedException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.NewVMCommand
    Set-VMDvdDrive : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:23 char:5
    + Set-VMDvdDrive -VMName $VMName -Path $ISO
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Set-VMDvdDrive], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.SetVMDvdDriveCommand
    Start-VM : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:24 char:5
    + Start-VM $VMName
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Start-VM], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.StartVMCommand
    Set-VMDvdDrive : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:27 char:5
    + Set-VMDvdDrive -VMName $VMName -Path $ISO
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Set-VMDvdDrive], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.SetVMDvdDriveCommand
    Start-VM : A parameter is invalid. Hyper-V was unable to find a virtual machine with name 003.
    At line:28 char:5
    + Start-VM $VMName
    + ~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (003:String) [Start-VM], VirtualizationInvalidArgumentException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.StartVMCommand

  • How to manage a connection with powershell using visual studio with C#

    Hi
     I want to manage a connection with powershell for a web app using visual studio with c#. and also run command with pipeline 
    Plz give a some suggestions..

    Hi Raj_Kumar_Saini,
    To make things clear, could you please clarify these thing?
    1. Do you mean you want to execute some PowerShell scripts from C# language? These blogposts may give you  some ideas:
    Executing PowerShell scripts from C#
    Powershell Automation and Remoting (a c# love story)
    Execute PowerShell from a ASP.NET Web Application
    2. Is your question related to Visual Studio Integration? Do you want to build a Visual Studio Extension?
    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.

  • Hyper-V(2012R2) Backup with Checkpoints(Snapshot) and Export - What to consider ?

    good evening
    Today I recognized that a VM Snapshot (excuse
    a checkpoint) can be exported  with
    Windows Server 2012R2. 
    The subsequent import resulted in a
    functional VM in saved state.  
    Question: What concerns a backup to a deduplicated Drive
    with the following PowerShell
    commands?
    # Backup running VM's on a hyper-v 2012R2
    # (p) by steini'14
    $rootPath = "I:\VMBackup"
    #create Backup Path of the Day
    $path = new-item -ItemType Directory -Path "$rootPath\$(Get-Date -f yy_MM_dd_HH-mm)"
    # Do Snapshot and export and "Merge!" Snapshot/Checkpoint for each vm on this host.
    foreach ($vm in get-vm){
        write-host "Start: $($vm.Name)"
        $snap = $vm |checkpoint-vm -SnapshotName "BackupJob $(Get-Date -f yy_MM_dd_HH-mm)" -Passthru
        $snap | Export-VMSnapshot -Path $Path.FullName
        $snap | Remove-VMSnapshot
    Start-DedupJob -Volume $path.Root -Type Optimization -Wait
    #PrepareDisk:
    #Add-WindowsFeature -name FS-Data-Deduplication
    #Enable-DedupVolume I:
    #Set-DedupVolume g: -MinimumFileAgeDays 0
    #Start-DedupJob -Volume i: -Type Optimization -Wait

    Hi ,
    I am not familiar with powershell .
    #create Backup Path of the Day
    $path = new-item -ItemType Directory -Path "$rootPath\$(Get-Date -f yy_MM_dd_HH-mm)"
    I think it will create a new folder to store the export image when the script start to run .
    Also the disk space for storing these image is a factor what you can think of .
    Best Regards
    Elton Ji
    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.

  • Jetcomp Utility Automation w/ PowerShell?

    Hello everyone!
    I'm working for a tech company that sells and services computers. We do a lot of routine maintenance on our customer's computers and jetcompact happens to be one of them. My job is to find out ways to make our maintenance more automated with less human interactions.
    I've scoured the internet for ways to automate JetCompact but only found links to the download center on Microsoft's website. At this point I'm not even sure that it is even possible to automate this utility. Can anyone enlighten this subject? Maybe even provide
    an alternative to it? I hope to use Powershell or Batch files to accomplish this.
    Thanks ahead of time,
    Sam

    Dave - I get that it doesn't get him anything more when run against the local computer, but perhaps it can be that turning point where he gets a greater interest in PowerShell and what the cmdlet can really do. I wasn't going to wrap the executable in the
    Invoke-Command cmdlet at first and then figured, why not? He asked about PowerShell. For me, I didn't always remember things the first time, but as I got more and more exposure I started to recognize cmdlets and was grateful I had seen them before - this still
    happens.
    Mildly off-topic, but congrats on the mentions from Don Jones in that recent PowerScripting Podcast.
    Sam - In the future you may want to explore PSRemoting and the built-in ability of the Invoke-Command cmdlet to run against remote computers. If PSRemoting was set up and the jetcomp.exe was on a remote computer(s) you could use the cmdlet with the -ComputerName
    parameter to run it and return the results back to you. You could even run a command prior to the Invoke-Command cmdlet to copy the executable to the remote computer first, if it wasn't already there. And before that you could test that the computer was online.
    Great stuff and all possible with PowerShell.

  • Set multi user column with PowerShell used to work in 2010 but no longer works in 2013

    In SharePoint 2010 I used PowerShell to set the value of multi user people columns and it worked really well.  I attempt to use the same PowerShell to set the same column type in SharePoint 2013 and it fails.
    here is the PowerShell that I use in 2010:
    $web = Get-SPWeb "http://intranet"
    $list = $web.lists["TestList"]
    $item = $list.items.add()
    $item["Title"] = "Test multi user column"
    $users = @("Domain\user1", "Domain\user2")
    $userList = new-object Microsoft.SharePoint.SPFieldUserValueCollection
    foreach($user in $users)
    $spUser = $web.EnsureUser($user)
    $userValue = new-object Microsoft.SharePoint.SPFieldUserValue($web, $spUser.ID, $spUser.Name)
    $userList.Add($userValue)
    $item["MultiUserColumn"] = $userList
    $item.update()
    I have used this on three SharePoint 2013 farms with differing results.  On two of them I receive an error when running $item.update(): Exception calling "Update" with "0" argument(s): "Invalid look-up value.  A look-up
    field contains invalid data. Please check the value and try again."
    If I take one of the users out of the $users list then it works fine, but it will not allow multiple users to be set with PowerShell.  I can use the GUI to add more than one user but not PowerShell.
    Does anyone know if these methods have changed in 2013? I haven't been able to find anyone else with this issue.
    mmm... coffee...

    Not sure but maybe something to do with casting. Below is the code snippet from one of the blogs. Try modifying your script like below and see if still you get the error
    [Microsoft.SharePoint.SPFieldUserValueCollection]$lotsofpeople = New-Object Microsoft.SharePoint.SPFieldUserValueCollection
    $user1 = $w.EnsureUser("domain\user1");
    $user1Value = New-Object Microsoft.SharePoint.SPFieldUserValue($w, $user1.Id, $user1.LoginName)
    $user2 = $w.EnsureUser("domain\user2");
    $user2Value = New-Object Microsoft.SharePoint.SPFieldUserValue($w, $user2.Id, $user2.LoginName);
    $lotsofpeople.Add($user1Value);
    $lotsofpeople.Add($user2Value);
    $i["lotsofpeoplefield"] = $lotsofpeople;
    $i.Update();
    #-or-
    $l.Fields["lotsofpeoplefield"].ParseAndSetValue($i,$lotsofpeople);
    $i.Update();
    Reference to the link
    http://social.technet.microsoft.com/wiki/contents/articles/20831.sharepoint-a-complete-guide-to-getting-and-setting-fields-using-powershell.aspx
    Geetanjali Arora | My blogs |

  • Activate File History in windows 8.1 with Powershell

    Hey :) 
    I just wondered if there is any way to activate File History in Windows 8.1 with Powershell? 
    I want to make a script where File History get activated automaticly, and since I want to do this on a lot of computers I want to use powershell. 

    Hi,
    Looks like you can just adjust a registry value to enable/disable this feature:
    http://www.eightforums.com/tutorials/7706-file-history-enable-disable-windows-8-a.html
    EDIT: Since you want to do this on multiple machines, I'd suggest using GP to set this value.
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • How to add the Note board web part to a page with powershell

    Hi everyone,
    I've been looking around everywhere but haven't seen it explicitly mentioned. 
    Does anyone know how to add the Note Board web part to a Team Site page, e.g. Non-publishing site, Left Zone, First webpart in the zone in powershell?
    Examples like this one http://adicodes.com/adding-web-part-to-page-with-powershell/ only talk about custom web parts uploaded from a local drive.
    The example here looks good - http://spcrew.com/blogs/lists/posts/post.aspx?id=21 but is it for the Page Viewer Web Part. How would you go about getting the correct name for the note board web part and configuring it? 
    Many Thanks,
    Ashley
    function main(){
    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
    $url = "http://sp2010dev1/sites/test1"
    $OpenWeb = Get-SPWeb $url
    $OpenWeb
    $OpenSite = Get-SPSite $url
    $file = $OpenWeb.GetFile("http://sp2010dev1/sites/test1/SitePages/test1.aspx")
    $WebPartManager = $file.GetLimitedWebPartManager([System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
    Add-PageViewerWebPart "http://sp2010dev1/sites/test1" "http://sp2010dev1/sites/test1/SitePages/test1.aspx" "Body" 0 "SPCrew Site" "sp2010dev"
    $OpenWeb.Dispose()
    function Add-PageViewerWebPart($SiteURL, $pageUrl, $webpartzone, $index, $title, $content)
        $site = new-object Microsoft.SharePoint.SPSite($SiteURL)
        $web=$site.OpenWeb()
        $webpartmanager=$web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
        $webpart = new-object Microsoft.SharePoint.WebPartPages.PageViewerWebPart
        $webpart.ChromeType = [System.Web.UI.WebControls.WebParts.PartChromeType]::TitleOnly;
        $webpart.Title = $title
        $webpart.ContentLink = "http://www.spcrew.com";
        $webpartmanager.AddWebPart($webpart, $webpartzone, $index);    
        $web.Close()
        $site.Close()
    function Get-SPSite([string]$url) {
        New-Object Microsoft.SharePoint.SPSite($url)
    function Get-SPWeb([string]$url) {
        $SPSite = Get-SPSite $url
        return $SPSite.OpenWeb()
        $SPSite.Dispose()

    Hi,
    According to your post, my understanding is that you wanted to add the Note board web part to a page with PowerShell.
    The name of the Note Board web part is SocialCommentWebPart.
    I recommend to use the powershell code below:
    $pageUrl="http://sitename/SitePages/test.aspx"
    $SiteURL="http://sitename"
    $site = new-object Microsoft.SharePoint.SPSite($SiteURL)
    $web=$site.OpenWeb()
    $webpartmanager=$web.GetLimitedWebPartManager($pageUrl, [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
    $webpart = new-object Microsoft.SharePoint.Portal.WebControls.SocialCommentWebPart
    $webpart.title="Note Board"
    $webpartmanager.AddWebPart($webpart, "MiddleZone", 0);
    $web.Close()
    Then the Note board web part will be added to the page.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Exchange 2010 - Report NDRs with powershell

    Hi all,
    I would like to analyze all internal NDRs within my exchange environment. For example we have systems which are hard coded with email addresses of internal recipients and people leave the business and their mailbox and associated email address will be removed
    from exchange but not from a third party system that has a list of addresses to send notifications out to or home grown scripts. In order to keep the email pipeline clean and follow best practices I would like to catch these NDRs and remove them from the relevant
    systems.
    Is there anyway I can do this with powershell, my environment Exchange 2010 SP2 and all the roles are on a single server.

    Hi Niko,
    I have just performed the following test:
    sent an email to an internal recipient were the address does not exist, example
    [email protected]
    The NDR does not come from [email protected]
    The headers for the NDR I got as listed below:
    MIME-Version: 1.0
    From: Microsoft Outlook
     <[email protected]>
    To: <[email protected]>
    Date: Thu, 11 Dec 2014 08:55:54 +0000
    Content-Type: multipart/report; report-type=delivery-status;
     boundary="129b7383-6632-4979-ab4a-e5742a33ae6b"
    X-MS-Exchange-Organization-SCL: -1
    Content-Language: en-GB
    Message-ID: <[email protected]>
    In-Reply-To: <[email protected]com>
    References: <[email protected]com>
    Thread-Topic: test
    Thread-Index: AdAVIEZfXlpAxeICRk2Dg71q+Amr/wAAADyf
    Subject: Undeliverable: test
    X-MS-Exchange-Organization-AuthSource: exchangeserver.mydomain.com
    X-MS-Exchange-Organization-AuthAs: Internal
    X-MS-Exchange-Organization-AuthMechanism: 05

  • Read Outlook Email and Get Specific Content from Mail with PowerShell

    Hi Everyone,
    I would like to get full content value by searching in mail body with PowerShell but I stuck at one place in scripting and would required help from your side. Below is my script with description.
    #Connecting Outlook with below command
    $Outlook = New-Object -ComObject Outlook.Application
    # Now getting all folders info in variable (Shows Email, Calendar, Tasks etc)
    $OutlookFolders = $Outlook.Session.Folders.Item(1).Folders
    #Now connecting Inbox mails
    $OutlookInbox = $Outlook.session.GetDefaultFolder(6)
    #Now reading latest mail
    $latestmail=$OutlookInbox.items | select -last 1
    #Now calling email content and getting email content as output in html
    $latestmail.HTMLBody
    #below is output
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
    <HTML>
    <HEAD>
    <META NAME="Generator" CONTENT="MS Exchange Server version 14.00.0004.000">
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <!-- Converted from text/plain format -->
    <P><FONT SIZE=2><A HREF="https://test.abc.com/sys/servlet/ViewFormServlet?f
    orm=NTE%3aNotifier&server=sm.user&eid=NTS000299462947">https://test.abc.com/sys/servlet/ViewFormServlet?form=NTE%3aNotifier&server=sm.user&eid=NTS4556555
    294437</A><BR>
    <BR>
    Incident IND000008655308 has been assigned to your group 'Windows
    ADMINISTRATION'.<BR>
    Company: ABC<BR>
    Customer Name: XYZ<BR>
    Service Type: Infrastructure Event<BR>
    Priority: High<BR>
    SLA Resolve Target Status: Within the Service Target<BR>
    SLA Response Target Status:<BR>
    Reported Source: Systems Management<BR>
    *******************************************************************<BR>
    Summary: server1.abc.com: Average (5 samples) total cpu is now 100.0
    0%, which is above the error t<BR>
    <BR>
    *******************************************************************<BR>
    Notes: server1.abc.com: Average (5 samples) total cpu is now 100.00%
    , which is above the error threshold (100%)</FONT></P>
    </BODY>
    </HTML>
    # Now my target is to search incident number which is starting from IND* and server name (server1.abc.com). I tried below code but not getting value. Please help me to get these two values from email.
    $latestmail.HTMLBody -match "IND"
    #Output
    True
    #but not getting full that is IND000008655308.
    Please help me.

    Try this:
    if($latestmail.HTMLBody -match 'IND(?<x>\d+)\S'){
    $value='IND'+$matches['x']
    }else{
    Write-Host 'Not found'
    \_(ツ)_/

  • How to create an azure website with PowerShell?

    Hello
    I'm, trying to create a new wordpress website in Azure with PowerShell, I saw a video: https://www.youtube.com/watch?v=LHjkn59Lf0g
    But, When execute my code, I get the following error:
    New-AzureResourceGroup :
    06:42:41 p. m. - Resource SuccessBricks.ClearDB/databases 'dbdb3' failed with message 'User
    failed validation to purchase resources. Error message: '["Credit Card is the only supported payment instrument for
    purchases"]''
    What Can I do?
    I have a bizspark subscription with enough money :S
    THANKS!

    Hi Victor,
    Thanks for your question.
    Firstly, I recommend you to create the website and recourse group in Azure portal to see if the issue persists.
    In addition, I will have a test for this and feedback to you later. Appreciate your patience.
    Best regards,
    Susie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • RE: Ole Automation with forte.

    Tran,
    Here is a piece of code(using Forte Version 3OF2 & Word 97) that we've
    used to determine if there is already an instance of Word running:
    // Create an instance of a Word Application and activate it.
    // If an a Word application exists, just activate it.
    if ( aTasks <> NIL and aTasks.Exists(aWordApplication.Name) )
    then
    aWordApplication.visible = TRUE;
    aWordApplication.Activate();
    else
    aWordApplication = new();
    aTasks = new();
    aWordApplication.CreateUsingProgID( 'word.application'
    aWordApplication.visible = TRUE;
    aWordApplication.Activate();
    aTasks is an attribute of type Tasks on our window & aWordApplication is
    an attribute of type _Application on our window. This code will work if
    there already is an instance of Word that was started from a Forte
    applicaiton. It doesn't recognize a instance of Word that was started
    outside of a Forte app. Hope this helps!!
    From: Quy Tran[SMTP:[email protected]]
    Sent: Wednesday, May 20, 1998 11:17 PM
    To: [email protected]
    Subject: Ole Automation with forte.
    Good Day forte users,
    I'm trying to invoke MSWord from a forte application.
    I set the objectreference using CreateUsingProgId(This is the only way
    that I could get it to work).
    The problem is when using CreateUsingProgId, forte will create another
    instance of Word. Is there a way to know if the instance already
    exists
    and retrieve the objectreference of that instance?
    Any help would be appreciated.
    Thanks
    Quy Tran
    Lumley Technology
    Analyst/Programmer
    [email protected]
    Ph : 612 93186722
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    If you are not the intended recipient, please notify the Sender.
    Non-business opinions may not reflect opinions of Piper Jaffray

    Hi Aurang
    You can call almost all methods using OLE. What is required is to know how to interpret a script to ABAP OLE call. This is explained in the tutorial<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c1d54348-0601-0010-3e98-bd2a2dcd9e6c">"An Easy Reference For OLE Automation"</a>
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • Merging vhdx & .avhdx with powershell error ....

    i m trying to merge a vhdx & avhdx with powershell
    the codes are
    Run diskpart.
    Enter: select vdisk file="<full path to the latest differencing disk>"
    A differencing disk ends in either .avhd or .avhdx.
    Enter: merge vdisk depth=n
    n will be the number of parent files you want to merge.  Since I had two parents, one .vhd and one .avhd for this .avhd file, I used depth=2.
    the problem is whenever i try to select the differencing disk in step 2 , i get an error ...device not ready
    if i changed the avhdx to vhdx ... i get the same error
    i unchecked the read only ... gave full permissions to vm machine and user ... still get error
    please advice or if you suggest a third party that can migrate the vhdx with its avhdx

    You will need a backup to go back to a valid database.
    Snapshots are not supported in Production and cause in few cases  issues and behaviour like you are encoutering now.
    You have to avoid using snapshots in production, snapshots are nice and they unction propely in 99% of the cases. You were not lucky. If you want to use snapshots with a VM for a reason (test update or a  new configuration),  backup your VM before.
    Regards, Samir Farhat Infrastructure and Virtualization Consultant || Virtualization, Cloud, Azure ? Follow and Ask here https://buildwindows.wordpress.com

  • Adding a CI Build with powershell

    Hi,
    Adding a CI Build (class: System.Build) with powershell to Service Manager 2012 R2 results in an error, but the Build is added with the correct properties. Here is the error message:
    New-SCSMObject : Item has already been added. Key in dictionary: 'Notes'  Key being added: 'Notes'
    At line:1 char:15
    + new-SCSMObject <<<<  (get-scsmclass System.Build) -propertyhashtable ($build)
        + CategoryInfo          : InvalidOperation: (Notes:ManagementPackProperty) [New-SCSMObject], ArgumentException
        + FullyQualifiedErrorId : property 'Notes' has already been added to collection,SMLets.NewSMObjectCommand
    here is what I do:
    $build=@{Displayname = "Test 1"}$build+=@{AssetStatus = "Deployed"}$build+=@{ObjectStatus = "Active"}$build+=@{Category = "Software"}$build+=@{Title = "Test"}$build+=@{Version = "1"}new-SCSMObject (get-scsmclass System.Build) -propertyhashtable ($build)
    If I querry this Object with
    get-scsmobject (get-scsmclass System.Build$) -Filter "Displayname -eq 'Test 1'"
    I get the warning:
    WARNING: The property 'Notes' already exists, skipping.
    Exception: The member "Notes" is already present.
    In my Build Form there are also two "notes" fields.
    So my questions:
    a) does this occur on other installations?
    b) If not: any idea, where this comes from or how I could find out.
    b) If yes: how do you deal with it?
    tia
    Patrick Wahlmüller

    Hi Roman,
    Thanks for your response.
    Here are some findings: Smlets are not exact enough, because in the System.build Object there are 2 Notes Fields. One from the System.ConfigItem class and one from the System.Build class. I do not understand the reason for two notes fields, but the smlets
    have a problem with it and the result is a warning. You can suppress this by
    get-scsmobject (get-scsmclass
    System.Build$)
    -Filter "Displayname -eq 'Test 1'" -WarningAction silentlycontinue
    (thanks to
    Jason)
    When I use native cmdlets:
    Get-SCSMClassInstance -class $buclass -Filter 'Displayname -eq "Test 1"'
    Results in two notes fields:
    Notes
    System.ConfigItem_Notes
    But, I'll give it a try with native cmdlets, since the are part of the product.
    But one question remains: Why are there two notes fields?
    Patrick Wahlmüller

  • DFS V2 setting ABE with Powershell

    Hello everybody
    we currently have a stand-alone DFS running on W2K8R2 without replication. Inside our central namespace the access based enumeration is enabled. In former times we create a dfs-share with dfscmd.exe for and used dfsutil.exe for setting the abe. This
    works very fine.
    Now I tried this with powershell:
    new-dfsnfolder creates the share as expected.
    grant-dfsnaccess seems to works without an error.
    But the share itself still has "use inheritance permissions from local filesystem" instead of "set explicit permissions on the dfs Folder" and is viewable for everybody. Switching inside the gui to "explicit permission" shows
    the permissions given with grant-dfsnaccess.
    Has anybody an idea how to switch this Setting?
    Best regards from Germany   Guido

    Hi Guido,
    It seems that you have encounter the issue described in this article:
    The Windows PowerShell cmdlet Grant-DfsnAccess does not change inheritance on DFS links
    This is because although the Grant-DfsnAccess cmdlet successfully configures the view permissions for individual groups or users, the cmdlet does not change the inheritance mode from use inherited to set explicit.
    To work around this problem, use one of the following method:
    dfsutil property sd grant \\Contoso.com\Software\Projects Contoso\SarahJones:RX protect
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Maybe you are looking for