Skip to content

Instantly share code, notes, and snippets.

@thu2004
Created April 15, 2016 12:07
Show Gist options
  • Save thu2004/737a04a96460ef4a9137722d05827864 to your computer and use it in GitHub Desktop.
Save thu2004/737a04a96460ef4a9137722d05827864 to your computer and use it in GitHub Desktop.
$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