dsc

Installing AppFabric 1.1 with PowerShell DSC results in modal dialog error

烂漫一生 提交于 2021-02-08 11:12:50
问题 I'm trying to automate the installation of AppFabric 1.1 on a Windows 2012 R2 server using PowerShell DSC. This is actually part of me trying to automate the SharePoint Foundation install and configuration, but AppFabric 1.1 is a pre-requisite. Below is a snippit from my DSC config script: Script InstallSharePointPreRequisites { GetScript = { Return "InstallSharePointPreRequisites" } TestScript = {$false} SetScript = { Start-Process -FilePath 'c:\temp\SharePoint\pre

Installing AppFabric 1.1 with PowerShell DSC results in modal dialog error

[亡魂溺海] 提交于 2021-02-08 11:12:34
问题 I'm trying to automate the installation of AppFabric 1.1 on a Windows 2012 R2 server using PowerShell DSC. This is actually part of me trying to automate the SharePoint Foundation install and configuration, but AppFabric 1.1 is a pre-requisite. Below is a snippit from my DSC config script: Script InstallSharePointPreRequisites { GetScript = { Return "InstallSharePointPreRequisites" } TestScript = {$false} SetScript = { Start-Process -FilePath 'c:\temp\SharePoint\pre

Using global variables in a ps1

非 Y 不嫁゛ 提交于 2021-01-28 18:43:41
问题 I can't seem to find good enough solution to my problem. Is there a good way of grouping variables in some kind of file so that multiple scripts could access them? I've been doing some work with Desired State Configuration but the work that needs to be done cannot be efficiently implemented that way. The point is to install Azure Build Agent on a server and then to configure it. There are some variables that really should not be inside a script file just copypasted like Personal Access Token.

DSC File Resource - copy file

僤鯓⒐⒋嵵緔 提交于 2021-01-27 14:12:37
问题 I'm using a PowerShell DSC Pull Server. It's possible to use the File resource to copy a file every time is modified? I've tried the below: File Test{ DestinationPath = "c:\yyy\test.txt" SourcePath = "\\share\test.txt" Ensure = "Present" Type = "File" Credential = $Credential Checksum = "modifiedDate" Force = $true} but no luck: if I modify the file from SourcePath I'd expect that the destination file should be updated too. 回答1: Add MatchSource, See documentation here. File Test{

Failure Installing DotNet 4.6.1 via Chocolatey using DSC cChocoPackageInstaller

泄露秘密 提交于 2020-01-05 04:06:13
问题 I'm attempting to set up a server Windows 2012 R2 in Azure via ARM templates and DSC. The DSC script runs the cChocoPackageInstaller to install dotnet4.6.1 (after running the cChocoInstaller). It looks like this: cChocoInstaller Choco { InstallDir = "c:\choco" } cChocoPackageInstaller DotNet461 { Name = "dotnet-461" DependsOn = "[cChocoInstaller]Choco" } The DotNet installer is downloaded but it ultimately fails when it is run. The log looks like this (I've excerpted just the errors here).

xWebAdministration does not appear in Get-DscResource (PowerShell)

耗尽温柔 提交于 2020-01-05 03:47:07
问题 This is similar to this question: I downloaded xWebAdminstration. I modified my environment variable PSModulePath in Windows (I'm testing/developing on Win 7). In C:\Program Files\WindowsPowerShell\Modules, I have 7 directories, for example the first is MSFT_xiisModule. My environment variable PSModulePath is set to: %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\ I ran this: Write-Host "`$env:PSModulePath=$($env

Chocolaty packages not installing via OneGet/PackageManagement in Windows 10?

那年仲夏 提交于 2020-01-01 08:00:46
问题 I'm trying to use oneget w/chocolaty and it doesn't seem to be working at all. The package says it's installed, no warning or notification. It installs the package in the choco directory, but doesn't run the install script and therefore the application is not actually installed. Note this is Windows 10 (Powershell 5). Get-PackageProvider –Name Chocolatey -ForceBootstrap Set-PackageSource -Name chocolatey -Trusted Install-package filezilla -Verbose -Force -ProviderName chocolatey yields 回答1:

Chocolaty packages not installing via OneGet/PackageManagement in Windows 10?

橙三吉。 提交于 2020-01-01 08:00:18
问题 I'm trying to use oneget w/chocolaty and it doesn't seem to be working at all. The package says it's installed, no warning or notification. It installs the package in the choco directory, but doesn't run the install script and therefore the application is not actually installed. Note this is Windows 10 (Powershell 5). Get-PackageProvider –Name Chocolatey -ForceBootstrap Set-PackageSource -Name chocolatey -Trusted Install-package filezilla -Verbose -Force -ProviderName chocolatey yields 回答1:

Chocolaty packages not installing via OneGet/PackageManagement in Windows 10?

让人想犯罪 __ 提交于 2020-01-01 07:59:45
问题 I'm trying to use oneget w/chocolaty and it doesn't seem to be working at all. The package says it's installed, no warning or notification. It installs the package in the choco directory, but doesn't run the install script and therefore the application is not actually installed. Note this is Windows 10 (Powershell 5). Get-PackageProvider –Name Chocolatey -ForceBootstrap Set-PackageSource -Name chocolatey -Trusted Install-package filezilla -Verbose -Force -ProviderName chocolatey yields 回答1:

Deploy asp.net web app on local or remote IIS using PowerShell DSC

[亡魂溺海] 提交于 2019-12-25 14:47:09
问题 I am unable to find any help on how to use PowerShell for DSC and deploy asp.net web app on local or remote on premises IIS. Can you please help me with the steps or any resources? 回答1: What's your preferred method of deploying code prior to using DSC? xRobocopy was created with this scenario in mind, but if you are packaging your solution using NuGet, you could also use the PackageManagement resource. I started working on a NuGet based config script recently but it isn't ready to publish in