Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Configuration MyWebsite
- {
- Import-DscResource -ModuleName xWebAdministration
- Node Webserver
- {
- WindowsFeature IIS
- {
- Ensure="Present"
- Name="Web-Server"
- }
- WindowsFeature Mgmt-Tools
- {
- Ensure = "Present"
- Name = "Web-Mgmt-Tools"
- }
- WindowsFeature Mgmt-Console
- {
- Ensure = "Present"
- Name = "Web-Mgmt-Console"
- }
- WindowsFeature Mgmt-Service
- {
- Ensure = "Present"
- Name = "Web-Mgmt-Service"
- }
- $secpasswd = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force
- $cred = New-Object System.Management.Automation.PSCredential ("username", $secpasswd)
- xWebAppPool ApplicationPool
- {
- Name = "my-application-pool"
- AutoStart = $true
- ManagedPipelineMode = "Integrated"
- ManagedRuntimeVersion = "v4.0"
- IdentityType = "SpecificUser"
- Credential = $cred
- Enable32BitAppOnWin64 = $false
- }
- }
- }
- $ConfigurationData = @{
- AllNodes = @(
- @{
- NodeName = "Webserver"
- PSDscAllowPlainTextPassword = $true
- PSDscAllowDomainUser = $true
- }
- )
- }
- MyWebsite -ConfigurationData $ConfigurationData
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement