Jonathan's Manage and Automate

VMM SCO SMA WAP - Solutions and Guidance


 Manage and Automate

                                           VMM SCO SMA WAP - Solutions and Guidance

  • 64bit PowerShell performance in Orchestrator

    imageSometimes you need to run a resource intensive PowerShell command using the ‘Run .Net Script’ activity. Problem is, Orchestrator is 32bit, and defaults to a 32bit PowerShell. What is the problem with this? 32bit processes can grow close to 2GB in memory. This is a hard limit. By using a 64bit process we break the 2GB barrier and gain performance.

    Simply run your PowerShell script in a ScriptBlock as listed below. The –ScriptBlock forces 64bit PowerShell. Test and enjoy!

    Invoke-Command -ComputerName localhost -ScriptBlock {
    write-host "64bit speed!"



  • What version of WAP and SPF am I running?

    imageA good friend of mine, DeWitt, has put together a list of WAP versions for reference. He also found a simple way for you to determine your version.

    The following are available options to determine the version of the Windows Azure Pack

    Option 1: On the server with Windows Azure Pack installed, view the version information listed in Control Panel -> Programs and Features for Windows Azure Pack - <module>

    Option 2: While connected to the Admin or Tenant portal,  press Ctrl+Alt+A and locate the Portal Version



    Version numbers for Windows Azure Pack:

    RTM: 3.10.8198.9
    UR1: 3.12.8198.0
    UR2: 3.14.8196.32
    UR3: 3.15.8196.48


    On the server with Windows Azure Pack installed, view the version information listed in Control Panel -> Programs and Features for System Center 2012 R2 Service Provider Foundation

    Version numbers for each release of Service Provider Foundation ( SPF )

    RTM: 7.2.1902.0
    UR1:  7.2.2051.0
    UR2:  7.2.2102.0
    UR3:  There is no UR3 for SPF




  • Update Rollups for System Center 2012 R2 and SP1

    imageJust a heads up that two UR3’s for System Center products have been released. There are many fixes for VMM and Orchestrator, as well as other components. A breakdown of articles below. VMM has a SQL script that is a required part of the install. Don’t forget!


    System Center 2012 SP1

    Update Rollup 7 for System Center 2012 Service Pack 1

    System Center 2012 R2

    Update Rollup 3 for System Center 2012 R2




  • VDI VMs deployed through RDS do not appear in the VMM 2012 console

    spur_gearI’ve run into this issue a few times, and finding the resolution was not easy. Anyone deploying VMs through Windows RDS should read this article. In this situation, your VMs are created and show up in Hyper-V and Failover Cluster. In VMM they either do not show up, or they appear to move from Host to Host in VMM. ‘Cluster-Invariant’ is the culprit. Enjoy the quick fix!




  • SCOM Maintenance Mode and Orchestrator

    I have had a few customers looking for a solution to SCOM maintenance mode using Orchestrator. Well, ‘Matty T’ has taken the time to put together a clear and thorough set of instructions to do so. Bookmark this one.

    Schedule SCOM Maintenance Mode with Orchestrator



  • Update Rollup 2 for System Center 2012 R2 is now available

     The latest Update Rollup has been released for System Center. It contains fixes for many System Center components, including Orchestrator and VMM, and should be treated as a mandatory install.

    It is pushed out by Windows Update, but the VMM installation requires a SQL script to be run. If you don’t run the script, you haven’t completed the update for VMM. Other SC products do not have a SQL script update to worry about.

    Here’s the link to the update. Remember to run the SQL script for VMM!

    VMM installation instructions

    There is a link on the update page above that takes you over to another KB where the SQL script and installation instructions are. Here’s that link:

    The instructions are:

    Important After you install the update package, you must apply the following SQL script on your Virtual Machine Manager Microsoft SQL Server database for Update Rollup 2 to function correctly.”

    This means simply:

    • Stop the VMM Server Service on the VMM server
    • Open SQL Project Studio
    • Connect to your VMM SQL database
    • Open a New Query in Project Studio
    • Copy and paste the script from the web page into this query
    • Make sure the database in the dropdown to the left indicates the name of your VMM database and not something like ‘Master’
    • Press F5 or the Execute button to perform the update
    • Start the VMM Server Service up again. Done




  • Script Browser! Script Analyzer!

    Script Browser
    “A world of scripts at your fingertips.” That’s the apt heading for a new add-in for the PowerShell ISE. It’s called Script Browser, and it gives you instant access to thousands of scripts in the familiar ISE environment.

    “Script Browser for Windows PowerShell ISE is an app developed by Microsoft Customer Services & Support (CSS) with assistance from the PowerShell team and the Garage to save IT Pros from the painful process of searching and reusing scripts. We start from the 9,000+ script samples on TechNet Script Center. Script Browser allows users to directly search, learn, and download TechNet scripts from within PowerShell ISE – your scripting environment.“

    Landing page:

    New version:


    Script Analyzer
    This bit is experimental, but it clearly looks like a step in the right direction. I’ll run some of my everyday scripts through it and see what it comes up with. I expect a learning experience will result. Use the same links as above for Script Browser.

    “You will get the chance to try out another new function bundled with Script Browser - ‘Script Analyzer’. Microsoft CSS engineer managed to use the PowerShell Abstract Syntax Tree (AST) to check your current script against some pre-defined rules. In this first version, he built 7 pilot PowerShell best practice checking rules. By double-clicking a result, the script code that does not comply with the best practice rule will be highlighted. We hope to get your feedback on this experimental feature.”





  • Orchestrator 2012 R2 Integration Pack for VMware vSphere

    imageA whole new set of tools for vSphere has been released for Orchestrator 2012 R2. Over 30 Activities to build out incredible automation Runbooks. Enjoy.

    System Center 2012 R2 Integration Pack for VMware vSphere

    Feature Summary
    The Integration Pack includes the following activities:

    • Add Network Adapter
    • Add VM Disk
    • Clone Linux VM
    • Clone Windows VM
    • Create VM
    • Customize VM
    • Delete VM
    • Get Cluster Properties
    • Get Datastore Capacity
    • Get Hosts
    • Get Resource Pool Runtime Info
    • Get Resource Pools
    • Get VM List
    • Get VM Properties
    • Get VM Status
    • Migrate VM
    • Move VM
    • Reconfigure VM
    • Reset VM
    • Revert VM Snapshot
    • Set Guest Info Variables
    • Set VM CD/DVD to ISO Image
    • Set VM Networks
    • Start VM
    • Stop VM
    • Suspend VM
    • Take VM Snapshot
    • Maintenance Mode
    • Get Host Properties
    • Get Host Datastores

    Configuration Screen





  • VMM Job fails with error 801

    This is one of the more common errors we run into. There is an object in the database that no longer exists. Follow this article to clear up 801 errors, and bookmark the article.  ;)  This is a SQL script that should be run with the VMM service in a stopped state.

    Performing an operation in Virtual Machine Manager fails with error 801




  • Update Rollups for SC 2012 SP1 and 2012 R2

    downloadAnother quarterly Update Rollup (UR) has been released for System Center 2012 SP1 and SC 2012 R2. In this post we focus on SC VMM and SC Orchestrator updates. A note about Update Rollups: do not consider these optional. Do not consider them hotfixes. Install them always when they are released. Each UR contains up to 25 fixes per product based on past releases. Here’s what is new with UR’s:



    Description of the fixes in Update Rollup 5 for System Center Orchestrator 2012 SP1

    Resolved issues
    Update Rollup 5 for System Center Orchestrator 2012 SP1 resolves the following issues. 
    Issue 1
    The Monitor Service activity does not let the configuration be saved if Monitor Service cannot resolve the hostname that is entered in the Computer Input property. If you try to save the configuration, you receive the following error message:

    Connection to the selected computer has failed

    Issue 2
    The Compress Files activity does not include files that are in subfolders that match the filter when the Include files in sub-folders option is selected.
    Issue 3
    The Send SNMP Trap activity does not send the correct results for certain combinations of values.
    Issue 4

    The SNMP Trap Variables are not retained in the correct order after the Properties dialog box is closed and then opened again.


    Description of Update Rollup 1 for System Center 2012 R2 Virtual Machine Manager

    There are special install instructions for this update. Please read the article!

    Update Rollup 1 for System Center 2012 R2 Virtual Machine Manager resolves the following issues:
    • System Center 2012 R2 Virtual Machine Manager cannot deploy a new or imported VMWare template.
    • A virtual machine with that uses VHDX cannot be refreshed correctly in System Center 2012 R2 Virtual Machine Manager, and you receive the following error message:

      Refresh job failed with error 2912: The requested operation cannot be performed on the virtual disk as it is currently used in shared mode (0xC05CFF0A)

    • Database operations sometimes fail with "FailedToAcquireLockException."
    • A new virtual machine template from a template that specifies an operating system profile doesn't use credentials from the operating system profile.
    • Virtual machines in VMWare that connect by the using Cisco N1000V dvSwitch are unavailable for management from Virtual Machine Manager.
    • System Center Virtual Machine Manager service crashes if you disable one of the teamed network adapters.
    • The Get-Scstoragearray -host command should return storage arrays that are visible to a host that is using zoning.
    • During the discovery of a network-attached storage (NAS) provider, the credentials that are used do not include a domain name.
    • Some localized strings are not displayed correctly in the UI.
    • A query to find the certificate should match both the subject name and the friendly name because FindBySubjectName is a wildcard search.
    • Template deployment fails, and you receive the following error message:

      Error (2904)
      VMM could not find the specified path on the <Server name> server.
      The system cannot find the path specified (0x80070003)

    • Virtual Hard Disk (VHD) cannot be mounted on a host because VHD conflicts with other disks because of a stale entry that was left in the dictionary of Virtual Machine Manager memory.
    • Differencing disk based deployment may fail because the parent disk is being refreshed as noncached.




  • SC VMM: Moving or Creating a VM fails with errors (2912) 0x80041001

    BITSRecently I have seen a rush of VMM cases that involve moving a VM through migration, or otherwise moving data (VHD, VHDX, ISO, etc.) around. I have found that in many of these cases there are suspended Background Intelligent Transfer Service (BITS) jobs. As long as there is a suspended job in the BITS queue on the VMM server or the Host you are moving data to, the move will fail.



    Typical VMM trace showing the issue: In this case a VMM trace shows a copy job beginning. Locate the first step of an exception at the bottom of the stack and read upwards.The first line shows that BITS is starting a copy job: 'at Microsoft.VirtualManager.Engine.Deployment.BitDeployer.Copy().'

    20:46:41.271 01-22-2014,0x09C4,0x0994,4,BitsDeployer.cs,506,0x00000000, Caught Exception,{00000000-0000-0000-0000-000000000000},1,
    20:46:41.272 01-22-2014,0x09C4,0x0994,4,BitsDeployer.cs,506,0x00000000,"Microsoft.Carmine.WSManWrappers.WSManProviderException: An internal error has occurred trying to contact an agent on the server.
    17993 Ensure the agent is installed and running. Ensure the WS-Management service is installed and running; then restart the agent.
        at Microsoft.Carmine.WSManWrappers.ErrorContextParameterHelper.ThrowTranslatedCarmineException(ErrorInfo ei; Exception ex)
        at Microsoft.Carmine.WSManWrappers.WsmanAPIWrapper.RetrieveUnderlyingWMIErrorAndThrow(SessionCacheElement sessionElement; COMException ce)
        at Microsoft.Carmine.WSManWrappers.WsmanAPIWrapper.Enumerate(String url; String filter; Type type)
        at Microsoft.Carmine.WSManWrappers.WSManRequest`1.Enumerate(String url; String wqlQuery)
        at Microsoft.VirtualManager.Engine.Deployment.NativeDeploymentUtils.IsBitsRemoteApiAvailable(WSManConnectionParameters connectionParams; BitsRemoteApi remoteApi)
        at Microsoft.VirtualManager.Engine.Deployment.LANAcceleratorFactory.GetDeploymentClientJob(WSManConnectionParameters connParams; WSManConnectionParameters remotePeerConnParams; String sourceFileName; String targetFilename; UInt16 port; Boolean privacy; UInt32 flags; String sessionID; Boolean resetJob)
        at Microsoft.VirtualManager.Engine.Deployment.BITSDeployer.CreateClientJob(DeploymentFile file; CLIENT_JOB_TYPE clientJobType; WSManConnectionParameters clientConnection; WSManConnectionParameters serverConnection; UInt16 serverTcpPort; Boolean clientPrivacy; Boolean startAfresh)
        at Microsoft.VirtualManager.Engine.Deployment.BitDeployer.Copy()
    *** Carmine error was: HostAgentFail (2912); HR: 0x80041001


    Perform these steps on the VMM server and any Hosts where data is being moved. Ignore any messages referring to the command being deprecated

    1. Open an elevated command prompt
    2. Enter 'bitsadmin /list /allusers'
    3. You will see the number of jobs suspended. Each job begins with a GUID
    4. Cancel each suspended job by entering 'bitsadmin /cancel {GUID}', where GUID represents the BITS job suspended
    5. Repeat the previous step for all BITS jobs
    6. Enter 'bitsadmin /list /allusers' when done and no jobs should show suspended

    I’ve written a KB article that details this same process. It will be available online soon.




  • Orchestrator Functions and Regular Expressions (Regex)

    imageThere are a number of ways to manipulate data using the Orchestrator built-in Activities. Text manipulation is a common need with Runbooks. An Activity pulls a string of data that you need only a part of, or need it in a different format. Fortunately, Orchestrator has many built-in Functions that can be used to further manipulate strings. Use these tools in the same places you would subscribe to data and they will be processed.

    For example, the string below will be converted to all UPPERCASE.

    [Upper('this will be inserted in upper case')]

    You must enclose the entire string to be manipulated in square brackets, with the command and the string. Some other commands

    Here’s the link to Orchestrator Functions


    Function and Definition

    Upper - converts text to uppercase.

    Lower - converts text to lowercase.

    Field - returns text in a specific position.

    Sum - returns the sum of a set of numbers.

    Diff - returns the difference of two numbers.

    Mult - returns the product of a set of numbers.

    Div - returns the quotient of two numbers.

    Instr - returns the position of first occurrence of text within another text.

    Right - returns a subset of the text from the right side of the full text.

    Left - returns a subset of the text from the left side of the full text.

    Mid - returns a subset of the text from the middle of the full text.

    LTrim - trims leading spaces from text.

    RTrim - trims the trailing spaces from text.

    Trim - trims leading and trailing spaces from text.

    Len - returns the length of text.


    Regular Expressions

    Regular expressions let you match a string to a pattern. This is a bit more complex, but allows for pulling really anything you need from a string.




    Matches any character except a newline.


    Matches the preceding item 0 or more times. For example, the "a*" pattern matches any string of a's in a row "a", "aaa", "aaaaaaaaaaaa", and an empty string "". To match any string of any character, use a dot followed by an asterisk. For example "a.*" matches any text that begins with the letter "a" and ends with any string of characters such as "abbb", "abcdef", or "automatic restart".


    Matches the preceding item 1 or more times. This is like * but you must have a least 1 of the preceding item to make a match. For example, the "ab+" pattern matches "abbbbb", "ab", but does not match "a". To contrast, the "ab*" pattern matches "a".


    Matches the preceding item 0 or 1 time. For example, the "ab?" pattern matches "a" or "ab" but does not match "abbb".


    Matches either the preceding expression or the following expression. Logical OR operator.


    Matches the expression at the end of the input or line. For example, "ab$" matches "I took a cab" or "drab" but does not match "absolutely not".


    Matches the expression at the beginning of the input or line. For example, "^ab" matches "absolutely not" or "abacuses are great!" but does not match "I took a cab" or "drab".


    For characters that are usually treated as special. This indicates that the next character is literal and is not to be treated as a special character. For example, "\." means match the "." character and not just any character.

    [ ]

    A character set. Matches any one of the enclosed characters. You can specify a range of characters by using a hyphen. For example, [a-zA-Z] matches any letter of the alphabet.

    [^ ]

    An excluded character set. This is the opposite of []. If any of the characters inside the brackets exist, the regular expression match fails. You can specify a range of characters by using a hyphen. For example, [^a-zA-Z] ensures that none of the letters in the alphabet are present.

    ( )

    A group expression. This groups an expression into an item that you can apply special characters to. For example, "a*(ba)+" matches "ba" "aba" or "ababa" but does not match "abbba" or "abaa"





  • Orchestrator Web Console Fails after Upgrade to 2012 R2

    This is an issue we have been tracking for a while now. Please see the KB article on how to get around this error.


    After upgrading to System Center 2012 R2 Orchestrator, attempts to start the Orchestration Web Console fails and the following messages will pop up in the browser:
    Error Executing the current operation
    Arguments: NotFound

    Error Executing the Current Operation

    Starting the Orchestration Web Console fails after upgrade to System Center 2012 R2




  • What version of VMM am I running?!?

    A new KB has been released that makes it simple to know what build of VMM you are running. This is important as you should always be at the latest Update Rollup or Service Pack possible. By knowing your build number you can identify updates that need to be installed. Find your build number on the list, then look for a higher build number in the same release of VMM. Best of luck!

    Stay up to date on updates!


    How to determine the version of Virtual Machine Manager


    an excerpt:

    System Center 2012 SP1 RTM  KB Date Released  3.1.6011.0  
    System Center 2012 SP1 Update Rollup 1 2785682
    System Center 2012 SP1 Update Rollup 2 2802159

    System Center 2012 SP1 Update Rollup 3 2836751
    System Center 2012 SP1 Update Rollup 4 2879276
    System Center 2012 R2 RTM     3.2.7510.0


    Denis pointed out that there is a similar list here. Thanks!




  • Technical Documentation: Virtual Machine Manager 2012 R2

    This is the go to source for VMM. Can VMM do x? How do you make VMM do x? Both questions answered in this ~800 page document, with a multitude of links to related information. Keep this one in your VMM toolkit.

    … and to answer your first question, yes; SC2012_VMM does not reflect that there is updated R2 material. This is the right doc.

    Applies To

    System Center 2012 – Virtual Machine Manager

    System Center 2012 Service Pack 1 (SP1) – Virtual Machine Manager (VMM)

    System Center 2012 R2 Virtual Machine Manager – NICE!

    Word and PDF versions available.


    Technical Documentation Download for System Center 2012 – Virtual Machine Manager





Jonathan's Manage and Automate

Jonathan's Manage and Automate