Created
April 15, 2016 12:07
-
-
Save thu2004/737a04a96460ef4a9137722d05827864 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ErrorActionPreference = "Continue" | |
function Get-ScriptPath { Split-Path $myInvocation.ScriptName } | |
. (Join-Path (Get-ScriptPath) automation_lib\automation_lib.ps1) | |
. (Join-Path (Get-ScriptPath) 0_setup_global_data.ps1) | |
Configuration DSC_TroubleShot | |
{ | |
param( | |
[string[]]$ComputerName="localhost" | |
) | |
Import-DscResource –ModuleName 'PSDesiredStateConfiguration' | |
Node $ComputerName | |
{ | |
Log loggingInfo | |
{ | |
Message = " Windows Environment variable set successfully." | |
} | |
#WindowsProcess ProcessDemo { | |
# Path = "Notepad.exe" | |
# Arguments = "" | |
#} | |
File InstallPowershellModules | |
{ | |
SourcePath = "c:\home\sa_qa_system_test\powershell\Modules" | |
DestinationPath = "C:\Program Files\WindowsPowerShell\Modules" | |
Type = "Directory" | |
Force = $true | |
Ensure = "Present" | |
Recurse = $true | |
} | |
#Environment AddPythonPath | |
#{ | |
# Name = "Path" | |
# Value = "c:\Program Files\Git\bin" | |
# Path = $true | |
#} | |
} | |
} | |
DSC_TroubleShot -ComputerName $computer -ConfigurationData $ConfigData | |
Start-DscConfiguration .\DSC_TroubleShot -Verbose -Wait -Force -ComputerName $computer -Credential $cred |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment