Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning about a parameter cannot be found when installing EPR #61

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/private/New-PostBody.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ function New-PostBody {
)
begin {
Write-Verbose "$($MyInvocation.MyCommand) begin"
if ($PSCmdlet.MyInvocation.MyCommand.Name -ne 'New-EPRInstallation') {
Write-Warning "This function should only be used when installing a new instance of ProcessRunner. Please use 'Easit.GO.Webservice' for posting data to Easit GO."
}
}
process {
if ($((Get-PSCallStack)[1].Command) -ne 'New-EPRInstallation') {
Write-Warning "This function should only be used (by 'New-EPRInstallation') when installing a new instance of ProcessRunner. Please use 'Easit.GO.Webservice' for posting data to Easit GO."
}
$items = @()
$propertiesArray = @()
foreach ($prop in $InstallerSettings.FeedbackSettings.postBody.properties) {
Expand Down
6 changes: 3 additions & 3 deletions source/private/Write-EPRInstallLog.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ function Write-EPRInstallLog {
)
begin {
Write-Verbose "$($MyInvocation.MyCommand) begin"
if ($PSCmdlet.MyInvocation.MyCommand.Name -ne 'New-EPRInstallation') {
Write-Warning "This function should only be used when installing a new instance of ProcessRunner."
}
}
process {
if ($((Get-PSCallStack)[1].Command) -ne 'New-EPRInstallation') {
Write-Warning "This function should only be used (by 'New-EPRInstallation') when installing a new instance of ProcessRunner. Please use 'Write-CustomLog' instead."
}
$FormattedDate = Get-Date -Format "yyyy-MM-dd HH:mm:ss.fff"
$today = Get-Date -Format "yyyyMMdd"
$LogName = "${LogName}_${today}.log"
Expand Down
5 changes: 4 additions & 1 deletion source/public/New-EPRInstallation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ function New-EPRInstallation {
[Switch]$DoNotSendInstallationDetailsToEasit
)
begin {
$Elevated = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if ( -not $Elevated ) {
throw "In order to install Easit Process Runner correctly, this session requires elevation (i.e open PowerShell as admin)."
}
$InformationPreference = 'Continue'
$script:ProgressPreference = 'SilentlyContinue'
$startingDirectory = Get-Location
Expand Down Expand Up @@ -84,7 +88,6 @@ function New-EPRInstallation {
if (Test-Path -Path $installPackagePath) {
$script:loggingParameters = @{
LogDirectory = "$installPackagePath"
LogLevel = 'INFO'
}
Set-Location $installPackagePath
Write-EPRInstallLog -Message "-- Installation start --" @loggingParameters
Expand Down