You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2015/10/23 19:55:16 UTC

[1/2] incubator-brooklyn git commit: Powershell scripting documentation - Remove the unnecessary Invoke-Command

Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 6ebf82a63 -> 9a80ebe3b


Powershell scripting documentation
- Remove the unnecessary Invoke-Command


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/4e641be7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/4e641be7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/4e641be7

Branch: refs/heads/master
Commit: 4e641be763b477b2a1aebf0f2dd9034cb37804f8
Parents: 6ebf82a
Author: Valentin Aitken <va...@cloudsoftcorp.com>
Authored: Fri Oct 23 20:24:59 2015 +0300
Committer: Valentin Aitken <va...@cloudsoftcorp.com>
Committed: Fri Oct 23 20:27:51 2015 +0300

----------------------------------------------------------------------
 docs/guide/yaml/winrm/index.md | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4e641be7/docs/guide/yaml/winrm/index.md
----------------------------------------------------------------------
diff --git a/docs/guide/yaml/winrm/index.md b/docs/guide/yaml/winrm/index.md
index e09564e..959f88c 100644
--- a/docs/guide/yaml/winrm/index.md
+++ b/docs/guide/yaml/winrm/index.md
@@ -152,7 +152,7 @@ When you have a command inside the powershell script which want to report its no
 please consider adding a check for its exit code after it.
 Example:
 
-    C:\install.exe
+    & "C:\install.exe"
     If ($lastexitcode -ne 0) {
         exit $lastexitcode
     }
@@ -283,10 +283,7 @@ became this:
     $secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force
     $mycreds = New-Object System.Management.Automation.PSCredential ($($env:COMPUTERNAME + "\Administrator"), $secpasswd)
 
-    Invoke-Command -ComputerName localhost -credential $mycreds -scriptblock {
-        param($driveLetter)
-        Start-Process ( $driveLetter + "setup.exe") -ArgumentList "/ConfigurationFile=C:\ConfigurationFile.ini" -RedirectStandardOutput "C:\sqlout.txt" -RedirectStandardError "C:\sqlerr.txt" -Wait
-    } -Authentication CredSSP -argumentlist $driveLetter
+    Start-Process ( $driveLetter + "setup.exe") -ArgumentList "/ConfigurationFile=C:\ConfigurationFile.ini" -Credential $mycreds -RedirectStandardOutput "C:\sqlout.txt" -RedirectStandardError "C:\sqlerr.txt" -Wait
 
 The `$pass=` line simply reads the Windows password from the entity before the script is copied to the server. This is
 then encrypted on the next line before being used to create a new credential object. Then, rather than calling the executable


[2/2] incubator-brooklyn git commit: This closes #988

Posted by al...@apache.org.
This closes #988


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/9a80ebe3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/9a80ebe3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/9a80ebe3

Branch: refs/heads/master
Commit: 9a80ebe3bf50d48d15e3bf2bf6cb7d171f52dc4f
Parents: 6ebf82a 4e641be
Author: Aled Sage <al...@gmail.com>
Authored: Fri Oct 23 18:55:03 2015 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Fri Oct 23 18:55:03 2015 +0100

----------------------------------------------------------------------
 docs/guide/yaml/winrm/index.md | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------