Welcome to the Blogcast Repository Sign in | Join | Help
Search BlogCastRepository.com for:
in Search

245 BlogCasts in The BlogCast Repository!

Post Install Roles and Features

Last post 11-16-2007 8:28 AM by David M. Stein. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 11-16-2007 8:28 AM

    Post Install Roles and Features

    This may be helpful to someone, maybe not.  It's a BAT file I use to speed up post-config after a base install of WS08 RC0.  You can edit the script to prepare the setup of a server to suit your needs and save them.  I know there are other ways to do this, and this is just one.  I wrote it using some snippets from other sites and combined them with a few unique pieces.  It was for Server Core originally, but should work on GUI installations as well.  Feel free to suggest improvements or point out problems.  :)

    @echo off
    rem ***********************************************************************
    rem WinSrv2008_Core_Setup.bat
    rem SkatterBrainz
    rem 08/16/07
    rem Post-installation configuration script for WS2008 Server Core setup
    rem        **** IMPORTANT!!!  EDIT THIS FILE BEFORE USING!!! ****
    rem ***********************************************************************
    echo Configuring Server Properties...
    pause

    rem netsh interface ipv4 show interfaces
    netsh interface ipv4 set address name=2 source=static address=192.168.1.50 mask=255.255.255.0 gateway=192.168.1.1
    netsh interface ipv4 add dnsserver name=2 address=192.168.1.20 index=1
    netsh firewall set icmpsetting 8

    echo Configuring Time source...
    rem ** You can either set the source explicitly or point to the pdc-emulator
    rem ** the following NET TIME statement is explicit.  To point to a pdc-emulator
    rem ** comment the NET TIME entry below, and uncomment the two lines beneath it
    rem ** Also, you can strip off the time.nist.gov to set SNTP implicitly
    net time /setsntp:time.nist.gov
    rem w32tm /config /update /syncfromflags:DOMHIER
    rem w32tm /resync /nowait

    echo Renaming Computer and setting the local Administrator password...
    netdom renamecomputer %computername% /NewName:ServerCore1
    net user administrator Password123 /set

    echo Configuring Automatic Updates...
    cscript c:\windows\system32\scregedit.wsf /au /4

    echo Enabling Remote Management services...
    cscript c:\windows\system32\scregedit.wsf /ar 0
    rem ** uncomment next line if you need to rdp from a previous windows version only
    rem cscript c:\windows\system32\scregedit.wsf /cs 0
    netsh advfirewall firewall set rule group="Remote Administration" new enable=yes
    netsh advfirewall set currentprofile settings remotemanagement enable

    rem echo Configuring the Page File...
    rem wmic pagefileset where name="" set InitialSize=BYTES,MaximumSize=BYTES

    rem ***********************************************************************

    rem ** install active directory services
    rem dcpromo /unattend:dcsetupinfo.txt

    rem ** uncomment lines below to enable installation of additional roles

    rem echo Configuring DHCP Server services...
    rem start /w ocsetup DHCPServerCore
    rem sc config dhcpserver start= auto
    rem net start dhcpserver

    rem echo Configuring DNS Server services...
    rem start /w ocsetup DNS-Server-Core-Role

    rem echo Configuring File Server services...
    rem start /w ocsetup FRS-Infrastructure
    rem mkdir c:\fileshare
    rem net share Files=c:\fileshare /remark:"Shared Files" /grant:users,change
    rem net share Files /unlimited

    rem echo Configuring Print Server services...
    rem start /w ocsetup Printing-ServerCore-Role

    rem echo Configuring Windows Media services...
    rem start /w ocsetup MediaServer

    rem echo Configuring IIS Web Server services...
    rem start /w ocsetup IIS-WebServerRole

    rem ***********************************************************************

    rem ** uncomment lines below to enable installation of additional features
    rem Installing Features...
    rem start /w ocsetup FailoverCluster-Core
    rem start /w ocsetup NetworkLoadBalancingHeadlessServer
    rem start /w ocsetup SUACore
    rem start /w ocsetup MultipathIo
    rem start /w ocsetup Microsoft-Windows-RemovableStorageManagementCore
    rem start /w ocsetup BitLocker

    rem ***********************************************************************

    echo Restarting Server now...
    shutdown /r /t 0
     

    • Post Points: 5
Page 1 of 1 (1 items)