Hello
After some push and nudge by @cstein want to explore the powershell module and move away from nsclient. We already have puppet and sccm method to install and configure agent. I do not want to touch those and just install the powershell module alone without installing / reinstalling the agent.
Also we need to install it in offline mode.
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11";
$ProgressPreference = "SilentlyContinue";
$global:IcingaFrameworkKickstartSource = 'C:\iCinga\icinga-powershell-kickstart.psi';
$Script = (Invoke-WebRequest -UseBasicParsing -Uri $global:IcingaFrameworkKickstartSource).Content;
$Script += "`r`n`r`n Start-IcingaFrameworkWizard;";
Invoke-Command -ScriptBlock ([Scriptblock]::Create($Script));
And boom error error error Obviously I did I mistake.
Exception calling "Create" with "1" argument(s): "At line:1 char:5
+ 102 117 110 99 116 105 111 110 32 83 116 97 114 116 45 73 99 105 110 ...
+ ~~~
Unexpected token '117' in expression or statement.
At line:1 char:9
+ 102 117 110 99 116 105 111 110 32 83 116 97 114 116 45 73 99 105 110 ...
+ ~~~
Unexpected token '110' in expression or statement.
At line:1 char:13
+ 102 117 110 99 116 105 111 110 32 83 116 97 114 116 45 73 99 105 110 ...
+ ~~
Unexpected token '99' in expression or statement.
At line:1 char:16
+ 102 117 110 99 116 105 111 110 32 83 116 97 114 116 45 73 99 105 110 ...
+ ~~~
Unexpected token '116' in expression or statement.
At line:1 char:20
+ 102 117 110 99 116 105 111 110 32 83 116 97 114 116 45 73 99 105 110 ...
+ ~~~
Unexpected token '105' in expression or statement.
At line:1 char:24
+ 102 117 110 99 116 105 111 110 32 83 116 97 114 116 45 73 99 105 110 ...
+ ~~~
Unexpected token '111' in expression or statement.
At line:1 char:28
+ 102 117 110 99 116 105 111 110 32 83 116 97 114 116 45 73 99 105 110 ...
+ ~~~
Unexpected token '110' in expression or statement.
At line:1 char:32
+ 102 117 110 99 116 105 111 110 32 83 116 97 114 116 45 73 99 105 110 ...
+ ~~
Unexpected token '32' in expression or statement.
At line:1 char:35
+ 102 117 110 99 116 105 111 110 32 83 116 97 114 116 45 73 99 105 110 ...
+ ~~
Unexpected token '83' in expression or statement.
At line:1 char:38
+ 102 117 110 99 116 105 111 110 32 83 116 97 114 116 45 73 99 105 110 ...
+ ~~~
Unexpected token '116' in expression or statement.
Not all parse errors were reported. Correct the reported errors and try again."
At line:1 char:1
+ Invoke-Command -ScriptBlock ([Scriptblock]::Create($Script));
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ParseException