header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Really dumb question but..
Last Post 13 Aug 2009 08:14 AM by rogerv. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
rogervUser is Offline
New Member
New Member
Posts:2
Avatar

--
13 Aug 2009 07:35 AM
    This is a really dumb question but i've got to ask it since i seem to be stumped at the moment. I want to start using powershell scripts from a server running scvmm with Powershell 1.0. However if i try to run any scripts i get an error saying that the particular cmdlet cannot be found. Are there any special instructions or procedures that have to be followed in setting up powershell to use the hyper-v and scvmm powershell scripts ?. If i use the scvmm gui or hyper-v gui then things are ok so i'm guessing i'm being stupid and need to add a path or something ?.
    Shay LevyUser is Offline
    PowerShell MVP, Admin
    Veteran Member
    Veteran Member
    Posts:1362
    Avatar

    --
    13 Aug 2009 07:41 AM
    Not dumb at all :)

    When you run scripts via scvmm gui it loads the VirtualMachineManager. In PowerShell console you need to load it your self. Run the following command:

    PS > Get-PSSnapin -Registered

    Name : Microsoft.SystemCenter.VirtualMachineManager

    Search the results for the above line, that's the snapin you need to load into your session. To load it:

    PS > Add-PSSnapin Microsoft.SystemCenter.VirtualMachineManager


    Now you can run scvmm cmdlets in your PowerShell session.

    Shay Levy
    Windows PowerShell MVP
    http://PowerShay.com
    PowerShell Community Toolbar
    Twitter: @ShayLevy
    rogervUser is Offline
    New Member
    New Member
    Posts:2
    Avatar

    --
    13 Aug 2009 08:14 AM

    Thanks, that worked - i'm now happily getting other errors (but all relating to the powershell scripts i'm running).

     

     

    Cheers

     

    Roger

    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer