PowerShell and server roles.

rated by 0 users
This post has 1 Reply | 1 Follower

Not Ranked
Posts 3
deurmat Posted: 04-19-2012 7:03 AM

Hello,

I have found some interesting sites that give examples of scripts for configuring AD.

But is it also possible with powershell to write a script to install server roles like DHCP with parameters?

I am very new to powershell and scripting in general. I've been searching the web for examples of extended powershell scripts for installing and configuring server roles like DHCP but without much results.

My goal is to "fully" automate the configuration of a windows server2008r2. First unattended deployment with WDS and then configuration with scripts to install some server roles (dhcp, dns, dc), a script to make shares with permissions (with net share), script for GPO's, script to create/import users.

I hope I can find some answers here.

Thx in advance.

 

 

Top 10 Contributor
Posts 640

Yes and no. On 2008R2, you can use Add-WindowsFeature to add any feature or role, and you can provide "answer files" to handle any installation parameters and make that process unattended. However, R2 only provides PowerShell commands for a limit number of roles, and DHCP is an example of one it doesn't provide commands for. Server 2012 does, though - that's really the first "fully PowerShell manageable" version of Windows. So you're just a little ahead of the game ;)

Page 1 of 1 (2 items) | RSS
Copyright 2012 PowerShell.com. All rights reserved.