• Merry Christmas and Happy New Year!

    What better way than using PowerShell to wish you all a Merry Christmas and Happy New Year!

     

    Copy and paste script and run in PowerShell.

     

    $frame1 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       M                   |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame2 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Me                  |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame3 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Mer                 |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame4 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merr                |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame5 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry               |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame6 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry C             |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame7 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Ch            |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame8 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Chr           |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame9 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Chri          |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame10 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christ        |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame11 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christm       |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame12 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christma      |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame13 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'                    *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame14 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)                              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame15 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             H                |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    
    $frame16 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             Ha               |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame17 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             Hap              |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame18 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             Happ             |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame19 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             Happy            |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame20 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             Happy N          |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame21 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             Happy Ne         |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame22 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             Happy New        |
    | *                               '^'      .                        |
    |
    `-------------------------------------------------------------------'
    "@
    
    $frame23 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             Happy New        |
    | *                               '^'      .                        |
    |                                                     Y   
    `-------------------------------------------------------------------'
    "@
    
    $frame24 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             Happy New        |
    | *                               '^'      .                        |
    |                                                     Ye   
    `-------------------------------------------------------------------'
    "@
    
    $frame25 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             Happy New        |
    | *                               '^'      .                        |
    |                                                     Yea   
    `-------------------------------------------------------------------'
    "@
    
    $frame26 = @"
    .----------------------_._------------------------------------------.
    |                     d888b         .                        *      |
    |   .   *           _ ?888P_                         .              |
    |             ,-~~-'-/_~~~\.'-~:8o.          *                      |
    |           ,'      .:8bv'      .:88.                     .         |
    |          /         .:88         .:8b    .     .                 . |
    |  .      /          .:8P          .:8b                             |
    |       ,'          .:8P\           .:88.       Merry Christmas     |
    |    ,='           .:88  \           __:88g_                        |
    |     -._          .:8|  |    _..-~,~    ~;'           &        *   |
    |        ~o..__    .:8|  | _-~   ?8b_ _.-'                          |
    |          ~~  ~~--.:88  /:___...(888)             Happy New        |
    | *                               '^'      .                        |
    |                                                     Year   
    `-------------------------------------------------------------------'
    "@
    
    
    $allframes = ($frame1,$frame2,$frame3,$frame4,$frame5,$frame6,$frame7,$frame8,$frame9,$frame10 `
                ,$frame11,$frame12,$frame13,$frame14,$frame15,$frame16,$frame17,$frame18,$frame19,$frame20 `
                ,$frame21,$frame22,$frame23,$frame24,$frame25,$frame26)
    
    
    $JingleBells = {[console]::beep(659,400);sleep -m 50;[console]::beep(659,400);sleep -m 50;[console]::beep(659,800) ;sleep -m 50;[console]::beep(659,400);sleep -m 50;[console]::beep(659,400);sleep -m 50;[console]::beep(659,800);sleep -m 50;[console]::beep(659,400);sleep -m 50;[console]::beep(783,400);sleep -m 50;[console]::beep(523,400);sleep -m 50;[console]::beep(587,400);sleep -m 50;[console]::beep(659,800)}
      
    $newPowerShell = [PowerShell]::Create().AddScript($JingleBells)
    $handle = $newPowerShell.BeginInvoke()
      
    while ($handle.IsCompleted -eq $false) {
      $allframes | foreach {$_;sleep -m 120;cls}   
    }
      
      
    $newPowerShell.EndInvoke($handle)
    
    $frame26
    

    If you don’t want to run the PowerShell script yourself you can watch the video Smile

  • Installing a new OpsMgr 2012 (SP1) environment the fast way

    Some days ago I read a blog post from Bjorn Houben called SCOM2012 – Quick test lab setup OpsMgr 2012 SP1 Beta using prepared VHD.

    In that blog post he described how he had used the pre-configured System Center 2012 SP1 Beta downloadable evaluation VHDs to quickly install a test lab setup for OpsMgr 2012 SP1 beta.

    And that’s exactly what I needed to do too, but I wanted to take it one step further also using the Windows Server 2012 Evaluation VHD for the needed Domain Controller in my test lab setup. And to top it off, use PowerShell as much as possible.

    On the 24th of December I posted a tweet with a picture showing the installation of the Domain Controller using some PowerShell scripts to automate the installation.

    image

    And since I’ve been getting requests to publish the PowerShell script I used to install the roles needed on the Domain Controller for the OpsMgr 2012 SP1 Beta test lab environment.
    And because Mats Wigle told me that “Sharing is caring”, I decided to share my experiences setting up a test lab environment with PowerShell and the steps outlined by Bjorn Houben.
    He should get most credits for this article, because he got me inspired.

    Pre-requisites:

    * I used a PowerShell script to create these Hyper-V switches, but this is an internal script we use for our workshops, so I cannot share this script.

     

    Now we have the Virtual Machines ready, we can start with the installation. First we need to start with the Domain Controller (OM2012SP1DC)

    Installation of Domain Controller

    For the Domain Controller we need to configure the following:

    1. Configure a static IP address.
    2. Rename default computer name of EVAL Windows Server 2012 Evaluation server.
    3. Configure AD DS / domain controller role.
    4. Configure DHCP server role.
      This is needed for the installation of the System Center 2012 Service Pack 1 Beta – Operations Manager – Evaluation (VHD) server which needs a DHCP server to get an initial IP address.
    5. Configure DNS server role (if desirable, include DNS forwarder for internet DNS queries).

     

    After starting the Virtual Machine you need to go through the walk-through of the setup.
    image

    Enter Password for Administrator Account

    image

    Remark: If you want to convert the Eval version to a full version with a Product Key of your own, you need to run the DISM tool before installing the Domain Controller Role.
    Make sure you are connected to the internet!

    DISM /online /Set-Edition:ServerDatacenter /ProductKey:[enter your key here] /AcceptEula

     

    image

    You can also continue to use the EVAL version till it expires if you want to.

    To run a PowerShell script with the steps described below you need to configure the Execution Policy on the future Domain Controller.

    Run the following PowerShell command from an elevated PowerShell console:

    Set-ExecutionPolicy ByPass

    In the following PowerShell script we are going to configure the following:

    1. Configure a static IP address.
    2. Rename default computer name of EVAL Windows Server 2012 Evaluation server.
    3. Configure AD DS / domain controller role.
    4. Configure DHCP server role.
      This is needed for the installation of the System Center 2012 Service Pack 1 Beta – Operations Manager – Evaluation (VHD) server which needs a DHCP server to get an initial IP address.
    5. Configure DNS server role (if desirable, include DNS forwarder for internet DNS queries).

    Pro-Tip: Store below script in an ISO so you can easily use the script from within your Virtual Machine.

     

    #Configure a static IP address.$IPAddress="192.168.1.101"$SubnetMask="255.255.255.0"$DefaultGateway="192.168.1.1"$DNSServers="192.168.1.101"#enter here a DNS server which can resolve (exteral) addresses Get-WmiObject Win32_NetworkAdapterConfiguration -Filter"IPEnabled=TRUE"|ForEach-Object { $_.EnableStatic($IPAddress,$SubnetMask) $_.SetGateways($DefaultGateway) $_.SetDNSServerSearchOrder($DNSServers) } #Rename Computername$NewComputerName="OM2012SP1DC"$ComputerInfo= Get-WmiObject -Class Win32_ComputerSystem $ComputerInfo.rename($NewComputerName) #Reboot ComputerRestart-Computer -Force #Configure AD DS / domain controller role.Install-WindowsFeature AD-Domain-Services -IncludeManagementTools $Password= ConvertTo-SecureString "P@ssw0rd"-AsPlainText -Force #Enter the same password you used during the initial install of the server.Install-ADDSForest -DomainName "corp.contoso.com"-SafeModeAdministratorPassword $Password-Force #Install DHCP RoleInstall-WindowsFeature DHCP -IncludeManagementTools #Create ScopeAdd-DhcpServerv4Scope -ComputerName OM2012SP1DC -Name OM2012SP1Scope ` -StartRange 192.168.1.105-EndRange 192.168.1.110 ` -Description "Scope for OM2012SP1"-Type DHCP ` -State Active -SubnetMask 255.255.255.0 ` -LeaseDuration (New-TimeSpan -Days 1) #Set DNS Server Scope optionSet-DhcpServerv4OptionValue -OptionId 6-Value 192.168.1.101#Restart ComputerRestart-Computer -force #Authorize DHCP ServerAdd-DhcpServerInDC -DnsName OM2012SP1DC.CORP.CONTOSO.COM

     

    We now have a Domain Controller ready for the test lab OM2012SP1 Beta Evalution VHD Virtual Machine.

     

    Installation of the OM2012 SP1 Beta Management Server

    Start the OM2012SP1 Beta Evalution VHD Virtual Machine from within Hyper-V and continue with the installation of OM2012 SP1 Beta Management Server.

    When you connect with the OM2012SP1 Beta Evalution VHD Virtual Machine you need to use the Wizard to configure the Management Server.

    image

    After configuring the correct settings and clicking OK, you need to go get a cup of coffee, because the rest of the installation will take about 90 minutes to finish (on my Windows 8 Hyper-V machine).

    You will see the following screens during the setup.

    image

    image

    image

    When finished you have your test lab OM2012 SP1 beta ready for testing. Now you only have to wait for the Public SP1 availability and upgrade to the latest version Smile

     

    And remember “Sharing is caring!”

  • Protect Your PowerShell Scripts with Version Control

    W00t! My Protect Your PowerShell Scripts with Version Control blog article I wrote for the Hey, Scripting Guy! Blog, got published todaySmile

    Check it out!