Hello together,
maybe some of you can help me. I m a newbie in powershell, and i have to make a script that deploy sources which droped on a tfs server on a iis webserver. on the end i have to execute a sql file on the specific database, which is also on the server stored. Can you tell me where i have to fill in the right parameters?
Write-Host "`$env:PSModulePath=$($env:PSModulePath)" Write-Host "`$env:ProgramFiles=$($env:ProgramFiles)" Write-Host "`$CurrentValue=$CurrentValue" Write-Host "`$PSVersionTable.PSVersion=$($PSVersionTable.PSVersion)" Get-Module -ListAvailable Write-Host "`n`n==== DscResources =====" Get-DscResource | Select Name, Properties | ft -AutoSize configuration Sample_xWebsite_NewWebsite { param ( # Target nodes to apply the configuration [string[]]$NodeName = 'localhost', # Name of the website to create [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [String]$WebSiteName ='testsite', # Source Path for Website content #[Parameter(Mandatory)] #[ValidateNotNullOrEmpty()] #[String]$SourcePath, # Destination path for Website content [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [String]$DestinationPath = 'd:\test\testsite\' ) # Import the module that defines custom resources Import-DscResource -Module xWebAdministration Node $NodeName { # Install the IIS role WindowsFeature IIS { Ensure = "Present" Name = "Web-Server" } # Install the ASP .NET 4.5 role WindowsFeature AspNet45 { Ensure = "Present" Name = "Web-Asp-Net45" } # Stop the default website xWebsite DefaultSite { Ensure = "Present" Name = "Default Web Site" State = "Stopped" PhysicalPath = "C:\inetpub\wwwroot" DependsOn = "[WindowsFeature]IIS" } xWebsite NewWebsite { Ensure = "Present" Name = $WebSiteName State = "Started" PhysicalPath = $DestinationPath BindingInfo = MSFT_xWebBindingInformation { Protocol = "HTTP" Port = 8080 #CertificateThumbprint ="71AD93562316F21F74606F1096B85D66289ED60F" #CertificateStoreName = "WebHosting" } } } } Sample_xWebsite_NewWebsite -WebSiteName 'testsite' -DestinationPath 'd:\test\testsite\' Start-DscConfiguration -Wait -Force -Verbose -Path .\Sample_xWebsite_NewWebsite