Error when running packaged SCVMM 2012 R2 Console (Virtual Machine Manager Command Shell) RRS feed

  • Question

  • When I sequence SCVMM 2012 R2 Console.

    The "Virtual Machine Manager Command Shell" Powershell module does not appear to work correctly. Does anyone know how to fix the problem? The shortcut has a target of " C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoExit -Command " if ((Get-ExecutionPolicy) -eq 'Restricted'){Set-ExecutionPolicy RemoteSigned -Scope Process -Force }; ipmo 'virtualmachinemanager\virtualmachinemanager.psd1'" /appvve:1D1320AE-0042-4 "

    Get-ExecutionPolicy : The term 'Get-ExecutionPolicy' 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:7
    +  if ((Get-ExecutionPolicy) -eq 'Restricted'){Set-ExecutionPolicy
    RemoteSigned -S ...
    +       ~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Get-ExecutionPolicy:String) [],
        + FullyQualifiedErrorId : CommandNotFoundException

    Do you want to run software from this untrusted publisher?
    63-2E6246FDEE85\Root\Microsoft System Center 2012 R2\Virtual Machine
    Manager\bin\virtualmachinemanager.types.R2Properties.ps1xml is published by
    CN=Microsoft Corporation, OU=MOPR, O=Microsoft Corporation, L=Redmond,
    S=Washington, C=US and is not trusted on your system. Only run scripts from
    trusted publishers.
    [V] Never run  [D] Do not run  [R] Run once  [A] Always run  [?] Help
    (default is "D"):

    (default is "D"):a
    ipmo : File C:\ProgramData\App-V\1D1320AE-0042-4D04-932E-8E32BEC69E52\320424A3-
    50FF-4A03-BF63-2E6246FDEE85\Root\Microsoft System Center 2012 R2\Virtual
    Machine Manager\bin\virtualmachinemanager.R2Aliases.ps1 cannot be loaded
    because running scripts is disabled on this system. For more information, see
    about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
    At line:1 char:104
    + ... cess -Force }; ipmo 'virtualmachinemanager\virtualmachinemanager.psd1'
    +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : SecurityError: (:) [Import-Module], PSSecurityEx
        + FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.PowerShell.Commands

    Any idea what I should do? Is SCVMM Console a bad candidate to APP-V, should I give up on the virtualized Powershell console and just use the GUI?

    Kind regards,


    • Edited by Pete_ML Wednesday, September 24, 2014 1:31 PM Error when running packaged console, not a sequencing doc.
    Wednesday, September 24, 2014 1:19 PM

All replies

  • Hello,

    If you enable the system to run scripts - will they run then?

    " cannot be loaded
    because running scripts is disabled on this system. For more information, see
    about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170."

    Nicke Källén | The Knack| Twitter: @Znackattack

    Wednesday, October 1, 2014 7:44 PM
  • First of all, I suppose the shortcut you use, is not the actual virtual package, as you try to use the /appvve-switch?
    powershell.exe has the parameter -executionpolicy. So you can use that, and not in the -command, try:

    "powershell.exe -ExecutionPolicy Unrestricted -NoExit -Command "ipmo 'virtualmachinemanager\virtualmachinemanager.psd1'" /appvve:1D1320AE-0042-4..."

    Thursday, October 2, 2014 10:49 AM