diff --git a/PowerShell/Deploy/Get-Config.ps1 b/PowerShell/Deploy/Get-Config.ps1 index c5cf43937..3a9f45dd7 100644 --- a/PowerShell/Deploy/Get-Config.ps1 +++ b/PowerShell/Deploy/Get-Config.ps1 @@ -13,8 +13,11 @@ param ( [Parameter(Mandatory = $false, ValueFromPipelineByPropertyName = $true, HelpMessage = 'Deploy Folder Name')][ValidateNotNullOrEmpty()][System.String]$DeployFolder = "/Powershell/Deploy" ) # Set variables: -$ScriptRoot = $PSScriptRoot -$FolderPath_ModuleRootPath = (Get-Item -Path:($ScriptRoot)).Parent.FullName +$ScriptRoot = $MyInvocation.MyCommand.Path +write-host $ScriptRoot +# break + +$FolderPath_ModuleRootPath = (Get-Item -Path:($ScriptRoot)).Directory.parent.FullName $GitHubWikiUrl = 'https://github.com/TheJumpCloud/support/wiki/' $FilePath_ModuleChangelog = $FolderPath_ModuleRootPath + '/ModuleChangelog.md' # Define required files and folders variables @@ -27,7 +30,7 @@ $RequiredFolders | ForEach-Object { $FolderPath = $FolderPath_Module + '/' + $FolderName New-Variable -Name:('FolderName_' + $_.Replace('-', '')) -Value:($FolderName) -Force -Scope Global; New-Variable -Name:('FolderPath_' + $_.Replace('-', '')) -Value:($FolderPath) -Force -Scope Global - # write-host "New Variable: $('FolderPath_' + $_) with value: $($FolderPath)" + write-host "New Variable: $('FolderPath_' + $_) with value: $($FolderPath)" } $RequiredFiles | ForEach-Object { $FileName = If ($_ -in ('psm1', 'psd1')) { @@ -38,7 +41,7 @@ $RequiredFiles | ForEach-Object { $FilePath = $FolderPath_Module + '/' + $FileName New-Variable -Name:('FileName_' + $_) -Value:($FileName) -Force -Scope Global; New-Variable -Name:('FilePath_' + $_) -Value:($FilePath) -Force -Scope Global; - # write-host "New Variable: $('FilePath_' + $_) with value: $($FilePath)" + write-host "New Variable: $('FilePath_' + $_) with value: $($FilePath)" } # Get .psd1 contents $Psd1 = Import-PowerShellDataFile -Path:($FilePath_psd1)