Hyper-V Powershell cmdlets 2008 R2

I just want Hyper-V cmdlets to work on 2008 R2..
googled, and googled, and have been all over the place, reading different stuff, attempting different solutions..
Have read that its not possible, have read required CodePlex packages.. Or install PowerShell 4..
Can someone reply with a proper step by step on how to accomplish this? Maybe specify different ways based on what version of PowerShell a server is on?
Links read...
move
hyper-v powershell module from 2012 to 2008 r2
Using
Hyper-V CMDlets in Server 2008 R2?
http://www.experts-exchange.com/Programming/Languages/Scripting/Powershell/Q_28203322.html
http://kickthatcomputer.wordpress.com/2013/04/02/hyper-v-powershell-command-are-missing/
http://windowsitpro.com/hyper-v/manage-hyperv-powershell

Hi Zewwy,
Based on my research, the
Hyper-v module in powershell can be available since windows server 2012, and is not backward compatible.
However, you can find good script function resource:
CodePlex PowerShell Management Library for
Hyper-V page to manage the hyper-v on windows server 2008 r2, for more detailed information, please refer to this article:
Virtualization: Create Hyper-V Virtual Machines with Windows PowerShell
I hope this helps.

Similar Messages

  • Installing Hyper-V Powershell Module on Virtual Machine

    I have a situation where I am running Hyper-V 2012 and have several virtual RemoteApp RDS servers (server 2012 R2) with a user profile disk server (also 2012R2 virtual machine) that stores all of the VHDX user profile disks. I want to perform some maintenance
    on the VHDX files by running optimize-vhd to compact the disks to keep them from being larger than they need to be. Anyhow, that PowerShell commandlet won't run unless the Hyper-V module is installed but in order to install it, the Hyper-V role must be installed.
    Since it's a virtual machine, it's not supported to install the Hyper-V role (although I hear it may be possible) so I was wondering if it is possible to install only the Hyper-V PowerShell modules. I would just use a Hyper-V server to run it but the commandlet
    does not seem to allow UNC/Share paths. Any suggestions? Thank you in advance for your time!

    Hi Scott,
    I tested on my hyper-v enviroment, and installed the feature "Hyper-v Module for Windows Powershell" on VM, and I could run the cmdlet "optimize-vhd", however, It couldn't run successfully without Hyper-v Role installed:
    In addition, if you just want to compact the vhd file on vm, how about using the command "DiskPart":
    You can then complete the compacting using diskpart from a Command Prompt:
    Run diskpart
    Select the disk via its path: select vdisk file="<path>"
    Attach it as read-only: attach vdisk readonly
    Compact it: compact vdisk
    Upon completion of the compact, detach it again: detach vdisk
    You can then re-attach it via Disk Management in its normal and newly compacted state
    Refer to:
    https://fiddley.wordpress.com/2014/01/27/dynamically-expanding-vhd-not-compacting-in-hyper-v/
    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]

  • How to send digitally sign S/MIME messages with Powershell cmdlet Send-MailMessage?

    Hello,
    using AD Windows PKI I assigned a certificate EKU (1.3.6.1.5.5.7.3.4) to sign emails and get this with
    autoenrollment also to my CERT Store PS
    CERT:\CurrentUser\UserDS\ or the certificate could found via MMC / certificates in the store structur under "Active Directory User Object".
    Signed messages (red icon) to send as S/MIME message using Outlook 2010 is not a problem.
    Using PowerShell cmdlet Send-MailMessage to be sent company notification for a new passwordpolicy some days before pwd expired?! I use the cmdlet already successfully to filling HTML bodies with variables and send to individuals accounts.
    Reduced simplified PS code:
    $SMTPBodyHtmlTemplate = Get-Content "C:\PS\Template\HTMLBody.html" | Out-String
    Function SendEmailNotification # /* SEND E-MAIL Notification to User */#
    [string] $SMTPServer = "mail.domain.local"
    $CurrentUser = "$env:username"
    [string]$SMTPFrom = (Get-ADUser $CurrentUser -properties mail).mail
    [string[]] $SMTPTo = $($Obj.EmailAddress)
    [string]$SMTPSubject = "Notification!"
    [String]$SMTPBodyHtml = $SMTPBodyHtmlTemplate.Replace("UserDisplayname","$($UserDisplayname)")
    Send-MailMessage -From $SMTPFrom -To $SMTPTo -Subject $SMTPSubject -BodyAsHtml $SMTPBodyHtml -dno OnFailure -SmtpServer $SMTPServer -encoding ([System.Text.Encoding]::UTF8) -ErrorAction Continue
    How can I use the PSDrive own CERT and using PowerShell cmdlet Send-MailMessage
    to send a signed message, without development experience?
    Thanks in advance for cooperation.
    Manfred Schüler

    Hi,
    could create with an other colleague a DLL file (with this informations) for successfully sending sign messages from PS-Script. 
    Function SendEmailNotification # /* SEND SIGN E-MAIL */#
    $SMTPBodyHtmlTemplate = Get-Content "C:\PS\Template\HTML.html" | Out-String
    [System.Reflection.Assembly]::LoadFile("C:\PS\Assembly\Cpi.Net.SecureMail.dll") | Out-Null
    [string]$strSmtpServer = "smtp.domain.local"
    [string]$strSmtpPort = "25"
    [string]$strFrom = (Get-ADUser $CurrentUser -properties mail).mail
    [string]$strFromAlias = (Get-ADUser $CurrentUser -properties DisplayName).DisplayName
    [string]$strTo = $UserEmailAddress
    [string]$strToAlias = $UserEmailDisplayName
    [String]$strSubject = "Subject as you like"
    [string]$strBody = $SMTPBodyHtmlTemplate.Replace("UserDisplayname","$($UserDisplayname)")
    $objMail = New-Object Cpi.Net.SecureMail.SecureMailMessage
    $objFrom = New-Object Cpi.Net.SecureMail.SecureMailAddress($strFrom,$strFromAlias,$objCert,$objCert)
    $objTo = New-Object Cpi.Net.SecureMail.SecureMailAddress($strTo,$strToAlias)
    $objMail.From = $objFrom
    $objMail.to.Add($objTo)
    $objMail.Subject = $strSubject
    $objMail.Body = $strBody
    $objMail.IsBodyHtml = $TRUE
    $objMail.IsSigned = $TRUE
    $objMail.IsEncrypted = $FALSE
    $objSMTPClient = New-Object System.Net.Mail.SmtpClient($strSmtpServer,$strSmtpPort)
    $objSMTPClient.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
    $objSMTPClient.send($objMail)
    Maybe Microsoft can implement this in future versions of the cmdlets Send-MailMessage ;-)
    Manfred Schüler

  • State View powershell cmdlets

    I am trying to use powershell cmdlets to pull up the health state of certain groups like "agent" and "Health Service" from a specific custom created state view in Operations manager. Is this possible? If so what is the syntax?
    Thanks!

    Hi
    You can pull information from sate view but you can query group using below code
    import-module operationsmanager
    New-SCOMManagementGroupConnection
    $gp=Get-SCOMGroup -DisplayName "operations Manager Agents"
    Get-SCOMMonitoringObject -Group $gp |select HealthState,Displayname
    Regards
    sridhar v

  • It is there an alternative to the Test-SystemHealth powershell cmdlet for Exchange 2013?

    Hello
    The Powershell cmdlet Test-SystemHealth, that was available on Exchange 2010, is no longer available on Exchange 2013.
    Test-SystemHealth cmdlet gathered data about the Microsoft Exchange system and analyzed the data according to best practices.
    Are there any alternatives to this for Exchange 2013?
    Thanks!

    Haven't really played with it too much, but check out Get-ServerHealth
    http://technet.microsoft.com/en-us/library/jj218703(v=exchg.150).aspx
    Looks to have replaced Test-SystemHealth.

  • Problem with IPAM Invoke-IpamGpoProvisioning PowerShell Cmdlet

    Hi Guys,
    I have an issue with IPAM configuration installed on a Windows Server 2012 R2 and I have DC, DNS and DHCP installed on Windows Server 2012 R2 on another server, when i run the PowerShell Cmdlet to provision the IPAM GPOs using the following Cmdlet (c:\Invoke-IpamGpoProvisioning
    -Domain mydomain.local GpoPrefixName KHA  -IpamServerFqdn IPAM.mydomain.local -DelegatedGpoUser administrator) i get this error. 
    Invoke-IpamGpoProvisioning : Failed to create universal group IPAMUG. Exception calling "CommitChanges" with "0"
    argument(s): "The server is unwilling to process the request.
    At line:1 char:1
    + Invoke-IpamGpoProvisioning -Domain mydomain.local -GpoPrefixName KHA -IpamServerFqdn ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Invoke-IpamGpoProvisioning], Exception
        + FullyQualifiedErrorId : InvalidOperation,Invoke-IpamGpoProvisioning
    How to solve this issue to find the GPOs created on the DC ?

    Hi ,
    Thank you for posting your issue in the forum.
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.
    Best Regards,
    Andy Qi
    Andy Qi
    TechNet Community Support

  • How to supply an end point to powershell cmdlet Rename-Blob

    [cross posted from http://stackoverflow.com/questions/21352295/azure-storage-cmdlet-rename-blob-wants-an-endpoint]
    I'm attempting to rename a blog to all lower case:
    Rename-Blob -BlobUrl "https://ttseast.blob.core.windows.net/images/Add.png" -NewName "https://ttseast.blob.core.windows.net/images/add.png"
    I've verified the blog URI by plugging it into a browser - however, attempting to execute the command tosses:
    Rename-Blob : Blob URI does not correspond to storage account end point. A Blob URI must contain blob storage end point.
    The arguments for Rename-Blob don't reference anything 'endpoint' - I've loaded the subscription so I should be authenticated and not forced to include AccountName/Key.
    How to I determine (or set) the required end point?
    thx

    If I'm not mistaken, I believe you're using Cerebrata Azure Management Cmdlets as Windows Azure PowerShell Cmdlets do not have a Rename-Blob Cmdlet (Cerebrata has it).
    To use Rename-Blob cmdlet, please try the following:
    Rename-Blob -BlobUrl "https://ttseast.blob.core.windows.net/images/Add.png" -NewName "https://ttseast.blob.core.windows.net/images/add.png" -AccountName "ttseast" -AccountKey "<your accountkey>"
    Thanks to Jaydonli for the alternate approach - turns out that while I thought I was using the native MS cmlets, in fact, I was using 3rd party CLI from Redgate. As per Gaurav Mantri at http://stackoverflow.com/questions/21352295/azure-storage-cmdlet-rename-blob-wants-an-endpoint

  • RDS PowerShell CMDLETS Issues

    I am working on some deployment scripts that will automatically add a Session Host to a new or existing collection at deployment. I am experiencing some inconsistency when it comes to the PowerShell CMDLETS for RDS. 
    For instance: The CMDLET Get-RDSessionCollection works on some servers and not on other servers...using the same command syntax. 
    The command I am trying to use as an example is: Get-RDSessionCollection -CollectionName "CollectionName" -ConnectionBroker "HA FQDN DNS name" I can never
    get any of the RDS CMDLETS to work when I use the HA FQDN name of the connection brokers. If I use the server FQDN of the active connection broker...it works most of the time (have notice it not working on a few servers). 
    When trying to troubleshoot why the HA name doesn't work, when doing a packet capture...I don't even see DNS queries go out to try resolve the HA FQDN name I put in...I see DNS queries go
    out for the server FQDN though. 
    Has anyone else experienced any issues with the CMDLETS? I am running Powershell as Administrator as well. 

    Hi,
    You can check the below article might useful in your case.
    Extending Remote Desktop Services using PowerShell
    http://blogs.technet.com/b/ptsblog/archive/2011/12/09/extending-remote-desktop-services-using-powershell.aspx
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    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]

  • Installing TFS PowerShell Cmdlets

    I cannot get the TFS PowerShell Cmdlets installed. During the install, I am not prompted to install them. And, in fact, the Typical Install text states it will not install them. After installing, then going in to modify, I do not see PowerShell Cmdlets in the
    list of features.
    I am on TFS 2013 Update 4 and PowerShell 4.0. How do I install these Cmdlets on the TFS server?

    Hi Dgjohnson,
    Thanks for your reply.
    Please download TFS 2013 Power Tools from here:https://visualstudiogallery.msdn.microsoft.com/f017b10c-02b4-4d6d-9845-58a06545627f.
    And share the custom installation features list screenshot here. 
    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.

  • Powershell cmdlets to access Azure Storage Analytics

    Hi,
    Are there PowerShell cmdlets to access Azure Storage Analytics data (Capacity Metrics)?
    -Vatsalya
    Vatsalya - MSFT The views and opinions expressed herein are those of the author and do not necessarily reflect the views of Microsoft.

    Hi Vatsalya,
    You could refer to this code sample about blob analytics metrics (https://gist.github.com/RichardSlater/4753866/raw/91a2bf45fb24dff4f770a1384c3e6578ecbd20d5/Get-CapacityMetrics.ps1
    ) about "StorageAnalyticsMetrics". In this sample, you didn't need to specify the container name.
    Please try it.
    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.

  • Do OM powershell cmdlets exist on MS??

    Do OM powershell cmdlet can execute on Management Server.
    I want to run some Cmdlets on agent managed computer.
    I have a rule which get the list of discoveries for my management pack and based on their enable value (true/false), some tasks are processed.
    Now if i install the management pack on agent managed computer, the rule is failing. Is there a way through which we can run OM powershell cmdlets on a agent managed computer.
    Thanks,
    Mukul

    Hi,
    Hope the below article be helpful for you:
    SCOM 2012 – Install SCOM PowerShell Modules Without SCOM Console Installation
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    After we successfully installing the module on agent, use get-module
    command to get all available module, and use get-command -module "modulename" to get all commands that can be used in the specific module.
    Regards,
    Yan Li
    Regards, Yan Li

  • How do i connect to SCVMM powershell cmdlet ??

    Hi all,
    I am trying to connect to scvmm powershell smdlet from SCVMM console but what i am getting is this:-
    Get-SCVMMServer : You cannot access VMM management server localhost. (Error ID: 1604)
    Contact the Virtual Machine Manager administrator to verify that your account is a member of a valid user role and
    then try the operation again.
    At line:1 char:409
    + ... $vmmserver_VAR=Get-SCVMMServer localhost -UserRoleName 'Administrator';
    +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ReadError: (:) [Get-SCVMMServer], CarmineException
        + FullyQualifiedErrorId : 1604,Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.ConnectServerCmdlet
    Please help.
    Thanks,
    Pranay.

    As was mentioned, SCVMM has its own security separate from Windows.
    To use the PowerShell cmdlet you must be an SCVMM Administrator.  No lower SCVMM user security level can use PowerShell.
    With the information provided that is the only guess.
    Since you are attempting to access localhost, I assume that you are launching the console on the SCVMM Server itself?  Which means it is running in your logged on user security context.
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

  • FSRM Powershell Cmdlets not working in Azure on Server 2012

    I am attempting to use the FSRM Powershell cmdlets on a 2012 server to configure auto quotas.  However I guess I am doing something wrong.
    Even though there are built-in templates and I have added the one I want manually and have created an auto quota from it, they do not appear to the cmdlets and the cmdlets keep throwing CimException when I try to use them to create templates and auto quotas.
    For example get-fsrmquotatemplate returns nothing and new-fsrmquotatemplate -name mydemo -size 10MB resulst in 
    new-fsrmquotatemplate : Not found
    At line:1 char:6
    + $res=new-fsrmquotatemplate mydemo -size 10MB
    +      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (MSFT_FSRMQuotaTemplate:Root/Microsoft/...RMQuotaTemplate) [New-fsrmQuot
       aTemplate], CimException
        + FullyQualifiedErrorId : HRESULT 0x80041002,New-FsrmQuotaTemplate
    Is there something I am supposed to do first to set the system up?

    Hi,
    From the result it seems that the FSRM templates cannot be found. So please check if both FSRM and Windows PowerShell 3.0 are installed in Features.
    Specifically you can test to remove and reinstall FSRM to see if issue will be fixed.
    If you have any feedback on our support, please send to [email protected]

  • Hyper V manager on 2008 R2 connect to 2012 R2 server core hyper V without domain

    Dear all
    I am using Hyper V manager on 2008 R2.
    Now I have one 2012 R2 server core hyper V without domain, I want to manage this server core hyper V with Hyper V manager on 2008 R2.
    When I add/connect, it display credential wrong. (use command net use drive works)
    May I know is it a must to join domain?
    thx
    Q K

    You're saying you want to use Hyper-V Manager on 2008R2 to manage 2012R2 Hyper-V, correct? If so, unfortunately this is by design:
    http://blogs.msdn.com/b/virtual_pc_guy/archive/2012/05/30/the-v2-wmi-namespace-in-hyper-v-on-windows-8.aspx
    You'll have to use the built-in tools in Windows 8.1 to manage 2012 R2 Hyper-V remotely. Here's the support matrix:
    http://support.microsoft.com/kb/2693643

  • PowerShell Cmdlet to rename a RDS Collection

    Hi,
    I am interacting with RDS Connection Broker via PowerShell Cmdlets. I want to rename a Collection using PowerShell Cmdlets. I have tried several Cmdlets specifically Set-RDVirtualDesktopCollectionConfiguration but it doesn't allow to change the name
    of the collection. I know it is possible to rename using the RDS CB user interface but the requirements are to use only Power Shell cmdlets. Is it possible using cmdlets? or is there some other way to rename the collection without using RDS Connection Broker
    user interface?
    Thanks

    Hi,
    As this case has been quiet for a while.I need to close the case and will mark it as Answer. If this case is still unresolved,I suggest you ask in a new thread. 
    Thanks for your Support & understanding!
    Regards.
    Dharmesh Solanki
    TechNet Community Support

Maybe you are looking for

  • BT infinity very poor service - what steps to canc...

    Any one advise How I can cancel, without penalty, due to poor service? I had BT Infinity installed end of January 2014 it was fine stable and running at around 65-68mbps until half way through May. Then speed dropped to 19mbps but worse the connectio

  • Localization issue on 10.5.3

    I have just updated to 10.5.3 and all works well.. but now the login window is in english and not in italian.. (I have "back" instead "indietro", "restart" instead "riavvia".. and so on..) Can you help me?

  • ScrollPane doesn't display its content

    I created a scrollpane in as3 and set its source to another object, which contains several rows of icons. The scrollbar in the scrollpane is getting the right length, which means the object was loaded as expected, but the contant is not showing corre

  • Weblogic Server 8.1 startup problem

    We are trying to install Weblogic 8.1 server in a isolated lab with no internet access. The opearting system is Solaris 8. The problem we are experiencing is that during start up it will attempts to contact jakarta.apache.org and time out after ~ 25

  • How can I stop these persistent "website wants to install adobe flash player" but its installed

    My computer keeps asking me to install the Adobe Flash Player and then when I try, I am told it is already installed.  I have tried every solution I've read about and I'm at the point of returning the darned computer.  Brand new, Win 8 os Lenovo.