locked
Hyper-V/Server 2008 R2 Core/PowerShell RRS feed

  • Question

  • Hi Everyone.

    I don't know if this question has been answered already, but I find this extremely difficult to find any information on, as there is simply too much; does anyone have any good ideas on how to write a decent shell script with PowerShell 2.0, for a Windows Server 2008 R2 (Standard, Enterprise, and/or Datacenter), to manage Hyper-V?

    Friday, August 17, 2012 4:45 AM

Answers

  • Hi,

    Please check the following link to see whether it’s what you want.
     
    PowerShell management Library for Hyper-V
    http://pshyperv.codeplex.com/

    • Marked as answer by Vincent Hu Monday, August 20, 2012 2:36 AM
    Friday, August 17, 2012 6:38 AM
  • One of the best ways to learn PowerShell is to steal, oops, borrow working scripts from another source.  http://technet.microsoft.com/en-US/scriptcenter is a great place to find a lot of scripts that do everything you listed above.  Also, if you start here - http://technet.microsoft.com/en-us/library/bb978526.aspx - and step through some of the simple examples, it helps you to learn.  The second reference is for PowerShell 3.0 (and yes, changes have been made that do simplify some constructs; except the old constructs are still valid, so that can get a little confusing to a beginner.)  PowerShell is very popular.  The problem is not finding information - there is too much out there; the problem is finding the right information.  Go down to your local Barnes and Noble and browse through some of the books until you find one that is helpful to you.

    tim

    • Marked as answer by Vincent Hu Monday, August 20, 2012 2:36 AM
    Saturday, August 18, 2012 3:17 PM

All replies

  • What exactly are you trying to make the script do?

    Friday, August 17, 2012 5:31 AM
  • Hi,

    Please check the following link to see whether it’s what you want.
     
    PowerShell management Library for Hyper-V
    http://pshyperv.codeplex.com/

    • Marked as answer by Vincent Hu Monday, August 20, 2012 2:36 AM
    Friday, August 17, 2012 6:38 AM
  • As Vincent says, pshyperv from codeplex is the best PowerShell tool for PowerShell 2.0.  Make sure you read the posts on the site there, as over the course of time, people have found certain errors with the library.  Some have fixes posted and some don't.  I've used this library for some projects, and it is very useful.  Once you get to PowerShell 3, you won't need it anymore.

    tim

    Friday, August 17, 2012 2:18 PM
  • Right now, just basic open/close Windows applications, create new users/user groups (assign permissions to said groups), and hard drive formatting/configuration.  Just something simple.
    Saturday, August 18, 2012 5:14 AM
  • Thanks, this will help.
    Saturday, August 18, 2012 5:15 AM
  • I haven't gotten to PowerShell 3 yet, and I have enough trouble learning PowerShell 1.0 & 2.0; I just hope 3.0 is a little easier to learn.  I see what PowerShell is capable of (along with shell scripts), which are the very reasons I want to learn, and use it (plus, I'm lazy and don't want have to do repetitive, mundane task that easily run the risk of being done inconsistently, if done by a different administrator).  Also, I don't want to have to deal with ID10t errors (or as little as possible).  :)
    Saturday, August 18, 2012 5:18 AM
  • One of the best ways to learn PowerShell is to steal, oops, borrow working scripts from another source.  http://technet.microsoft.com/en-US/scriptcenter is a great place to find a lot of scripts that do everything you listed above.  Also, if you start here - http://technet.microsoft.com/en-us/library/bb978526.aspx - and step through some of the simple examples, it helps you to learn.  The second reference is for PowerShell 3.0 (and yes, changes have been made that do simplify some constructs; except the old constructs are still valid, so that can get a little confusing to a beginner.)  PowerShell is very popular.  The problem is not finding information - there is too much out there; the problem is finding the right information.  Go down to your local Barnes and Noble and browse through some of the books until you find one that is helpful to you.

    tim

    • Marked as answer by Vincent Hu Monday, August 20, 2012 2:36 AM
    Saturday, August 18, 2012 3:17 PM
  • Thanks.

    I hope this makes it easier.

    Saturday, August 18, 2012 5:05 PM