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
[dev.icinga.com #13147] AgentScript Compatibility with PowerShell 2 #597
Comments
Updated by tgelf on 2016-11-10 16:15:01 +00:00
@cstein: any chance we get this working with the PowerShell v2 dinosaur? @siegfried: on what kind of system did you met PowerShell v2? While v3 is the default since Windows 8, it should also be available for all systems since Windows 7... |
Updated by siegfried on 2016-11-10 16:20:20 +00:00 Hi It is 2008 R2 see you Siegfried Am 10.11.2016 um 17:15 schrieb development@icinga.org:
-- NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg **** OSMC 2016 - November - netways.de/osmc **** **** OSDC 2017 - Mai – osdc.de **** |
Updated by cstein on 2016-11-10 16:21:15 +00:00 Yes this would be possible and require some intense tests to ensure it will work on all environments including execution on Windows boot. Best regards |
Updated by siegfried on 2016-11-10 16:24:57 +00:00 Hi about PS Versions there is a link https://4sysops.com/archives/powershell-versions-and-their-windows-version/ see you Siegfried Am 10.11.2016 um 17:15 schrieb development@icinga.org<mailto:development@icinga.org>: Issue #13147 has been updated by tgelf. Status changed from New to Assigned @cstein: any chance we get this working with the PowerShell v2 dinosaur? @siegfried: on what kind of system did you met PowerShell v2? While v3 is the default since Windows 8, it should also be available for all systems since Windows 7... Support #13147: AgentScript Compatibility with PowerShell 2
Download the Icinga 2 Agent Installer from out defined source -- NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg **** OSMC 2016 - November - netways.de/osmc **** **** OSDC 2017 - Mai – osdc.de **** |
Updated by tgelf on 2016-11-10 16:35:17 +00:00
@siegfried: any chance you can upgrade those systems from that insanely old version, or are you forced to stick with them?
|
Updated by tgelf on 2016-12-13 09:41:09 +00:00
Should have been fixed with ac3e541, thanks Christian! |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/13147
Created by siegfried on 2016-11-10 16:07:26 +00:00
Assignee: cstein
Status: Resolved (closed on 2016-12-13 09:41:09 +00:00)
Target Version: 1.3.0
Last Update: 2016-12-13 09:41:09 +00:00 (in Redmine)
This part of the script calls Functions which are available from Version 3
Download the Icinga 2 Agent Installer from out defined source
#
$installer | Add-Member -membertype ScriptMethod -name 'downloadInstaller' -value {
if (-Not $this.config('agent_version')) {
return;
}
$WebStatusCode = 0;
$url = $this.config('download_url') + $this.getProperty('install_msi_package');
$this.info('Downloading Icinga 2 Agent Binary from ' + $url + ' ...');
$execptionMsg = '';
Try {
$WebStatusCode = Invoke-WebRequest -Method Head -Uri "$url"
##### ver 3 of PS #####
if ($WebStatusCode.StatusCode -eq 200) {
Invoke-WebRequest "$url" -OutFile $this.getInstallerPath();
} else {
throw 'Failed to download Icinga 2 Agent Installer from URL';
}
} catch {
throw 'Unable to download Icinga 2 Agent from ' + $url + '. Error: ' + $_.Exception.Message;
}
}
The text was updated successfully, but these errors were encountered: