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

Sitecore Powershell - Install-UpdatePackage Cmdlet #73

Closed
sharprajat opened this issue Aug 26, 2013 · 13 comments
Closed

Sitecore Powershell - Install-UpdatePackage Cmdlet #73

sharprajat opened this issue Aug 26, 2013 · 13 comments
Labels
question Need help solving a problem.
Milestone

Comments

@sharprajat
Copy link

Hi

I am trying to use Install-UpdatePackage Cmdlet in Sitecore Powershellinstall-update like this

install-updatepackage -UpgradeAction 0 -InstallMode 1 -verbose

and always get an error

writeErrorStream : True
Exception : System.Management.Automation.ParameterBindingException: Cannot bind positional parameters because no names were given.
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
at System.Management.Automation.PipelineNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
TargetObject :
CategoryInfo : InvalidArgument: (:) [Install-UpdatePackage], ParameterBindingException
FullyQualifiedErrorId : AmbiguousPositionalParameterNoName,Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Packages.InstallUpdatePackageCommand
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
PipelineIterationInfo : {}
PSMessageDetails :

I am not sure what are the correct values for -UpgradeAction and -InstallMode parameters for this Cmdlet.

Is there a place where I can find some tutorials/examples.

Thanks
Rajat

@michaellwest
Copy link
Member

Have you provided the -Path parameter? This is a positional parameter which
is the first position.

Try this:
Install-UpdatePackage -Path "C:\mypackage.update" -UpgradeAction 0
-InstallMode 1 -Verbose

On Mon, Aug 26, 2013 at 8:34 AM, sharprajat notifications@github.comwrote:

Hi

I am trying to use Install-UpdatePackage Cmdlet in Sitecore
Powershellinstall-update like this

install-updatepackage -UpgradeAction 0 -InstallMode 1 -verbose

and always get an error

writeErrorStream : True
Exception : System.Management.Automation.ParameterBindingException: Cannot
bind positional parameters because no names were given.
at
System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object
input, Hashtable errorResults, Boolean enumerate)
at System.Management.Automation.PipelineNode.Execute(Array input, Pipe
outputPipe, ArrayList& resultList, ExecutionContext context)
at
System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode
statement, Array input, Pipe outputPipe, ArrayList& resultList,
ExecutionContext context)
TargetObject :
CategoryInfo : InvalidArgument: (:) [Install-UpdatePackage],
ParameterBindingException
FullyQualifiedErrorId :
AmbiguousPositionalParameterNoName,Cognifide.PowerShell.PowerShellIntegrations.Commandlets.Packages.InstallUpdatePackageCommand

ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
PipelineIterationInfo : {}
PSMessageDetails :

I am not sure what are the correct values for -UpgradeAction and
-InstallMode parameters for this Cmdlet.

Is there a place where I can find some tutorials/examples.

Thanks
Rajat


Reply to this email directly or view it on GitHubhttps://github.com//issues/73
.

@sharprajat
Copy link
Author

Hi

Thanks for the quick response.

I tried with -Path and got this error

Sorry, can't find your command result. Well this is embarassing. Try again?

What does this mean?

Also, I would like to know the possible values that can be passed for -UpgradeAction and -InstallMode parameters. I just made a guess with 0 and 1.

Rajat

@michaellwest
Copy link
Member

InstallMode and UpgradeAction I are part of the Sitecore.Update.dll. When I
use the UpdateInstallationWizard.aspx the url would reflect Update and
Upgrade (1 and 1).

public enum InstallMode
http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Sitecore.Update:1.0.0.0/Sitecore.Update.Utils.InstallMode

{
Install http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Sitecore.Update:1.0.0.0/Sitecore.Update.Utils.InstallMode/Install,
Update http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Sitecore.Update:1.0.0.0/Sitecore.Update.Utils.InstallMode/Update
}

public enum UpgradeAction
http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Sitecore.Update:1.0.0.0/Sitecore.Update.Installer.Utils.UpgradeAction

{
Preview http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Sitecore.Update:1.0.0.0/Sitecore.Update.Installer.Utils.UpgradeAction/Preview,
Upgrade http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Sitecore.Update:1.0.0.0/Sitecore.Update.Installer.Utils.UpgradeAction/Upgrade
}

On Mon, Aug 26, 2013 at 9:01 AM, sharprajat notifications@github.comwrote:

Hi

Thanks for the quick response.

I tried with -Path and got this error

Sorry, can't find your command result. Well this is embarassing. Try again?

What does this mean?

Also, I would like to know the possible values that can be passed for
-UpgradeAction and -InstallMode parameters. I just made a guess with 0 and
1.

Rajat


Reply to this email directly or view it on GitHubhttps://github.com//issues/73#issuecomment-23264304
.

@sharprajat
Copy link
Author

Hi Michael

I keep getting this error "Sorry, can't find your command result. Well this is embarassing. Try again?" when I try to execute Install-UpdatePackage -Path "PackageName" -UpgradeAction 1 -InstallMode 1 –Verbose

Changed the Execution Policy to RemoteSigned (Set-ExecutionPolicy RemoteSigned) and ran the command again without any luck.

Is there anything that I am missing.

Rajat

@michaellwest
Copy link
Member

I have version 2.2 installed and just tried this without any problems.

Install-UpdatePackage -Path
"$apppath\sitecore\admin\packages\MyPackage.files.update"
-UpgradeAction 1 -InstallMode 1

On Mon, Aug 26, 2013 at 11:26 AM, sharprajat notifications@github.comwrote:

Hi Michael

I keep getting this error "Sorry, can't find your command result. Well
this is embarassing. Try again?" when I try to execute
Install-UpdatePackage -Path "PackageName" -UpgradeAction 1 -InstallMode 1
–Verbose

Changed the Execution Policy to RemoteSigned (Set-ExecutionPolicy
RemoteSigned) and ran the command again without any luck.

Is there anything that I am missing.

Rajat


Reply to this email directly or view it on GitHubhttps://github.com//issues/73#issuecomment-23275645
.

@sharprajat
Copy link
Author

I too have version 2.2 installed.

No idea what's causing the error.

Rajat

Rajat Sharma | MCP .NET, MCTS MOSS 2007
Softbits Inc. | Director
Mobile: 647-928-7880
Email: softbits@yahoo.ca
Windows Live: bitshot@hotmail.com
Google: sharprajat@gmail.com
Skype name: sharprajat
LinkedIn Profile: http://ca.linkedin.com/pub/rajat-sharma/14/812/48b

Date: Mon, 26 Aug 2013 10:19:26 -0700
From: notifications@github.com
To: Console@noreply.github.com
CC: bitshot@hotmail.com
Subject: Re: [Console] Sitecore Powershell - Install-UpdatePackage Cmdlet (#73)

I have version 2.2 installed and just tried this without any problems.

Install-UpdatePackage -Path

"$apppath\sitecore\admin\packages\MyPackage.files.update"

-UpgradeAction 1 -InstallMode 1

On Mon, Aug 26, 2013 at 11:26 AM, sharprajat notifications@github.comwrote:

Hi Michael

I keep getting this error "Sorry, can't find your command result. Well

this is embarassing. Try again?" when I try to execute

Install-UpdatePackage -Path "PackageName" -UpgradeAction 1 -InstallMode 1

–Verbose

Changed the Execution Policy to RemoteSigned (Set-ExecutionPolicy

RemoteSigned) and ran the command again without any luck.

Is there anything that I am missing.

Rajat

Reply to this email directly or view it on GitHubhttps://github.com//issues/73#issuecomment-23275645

.


Reply to this email directly or view it on GitHub.

@michaellwest
Copy link
Member

Can you provide your log file?

On Mon, Aug 26, 2013 at 12:34 PM, sharprajat notifications@github.comwrote:

I too have version 2.2 installed.

No idea what's causing the error.

Rajat

Rajat Sharma | MCP .NET, MCTS MOSS 2007
Softbits Inc. | Director
Mobile: 647-928-7880
Email: softbits@yahoo.ca
Windows Live: bitshot@hotmail.com
Google: sharprajat@gmail.com
Skype name: sharprajat
LinkedIn Profile: http://ca.linkedin.com/pub/rajat-sharma/14/812/48b

Date: Mon, 26 Aug 2013 10:19:26 -0700
From: notifications@github.com
To: Console@noreply.github.com
CC: bitshot@hotmail.com
Subject: Re: [Console] Sitecore Powershell - Install-UpdatePackage Cmdlet
(#73)

I have version 2.2 installed and just tried this without any problems.

Install-UpdatePackage -Path

"$apppath\sitecore\admin\packages\MyPackage.files.update"

-UpgradeAction 1 -InstallMode 1

On Mon, Aug 26, 2013 at 11:26 AM, sharprajat <notifications@github.com

wrote:

Hi Michael

I keep getting this error "Sorry, can't find your command result. Well

this is embarassing. Try again?" when I try to execute

Install-UpdatePackage -Path "PackageName" -UpgradeAction 1 -InstallMode 1

–Verbose

Changed the Execution Policy to RemoteSigned (Set-ExecutionPolicy

RemoteSigned) and ran the command again without any luck.

Is there anything that I am missing.

Rajat

Reply to this email directly or view it on GitHub<
#73 (comment)

.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/73#issuecomment-23280225
.

@AdamNaj
Copy link
Member

AdamNaj commented Aug 26, 2013

My 2 cents...

From the log seems like the update went through.

The Sorry, can't find your command result. Well this is embarassing. Try again? hints the fact to me too. The problem is kind of with the message... really. What showing the message means it that the PowerShell session that started the script could not be found in cache - which means the application has restarted which implies that ASP.NET restarted your app after some config files or binary files were changed in your app folder... which in turns means that your package has been deployed.

Does that help? Could you verify?

@AdamNaj
Copy link
Member

AdamNaj commented Aug 26, 2013

I've changed the message to:

Can't find your command result. 
This might mean that your session has timed out or your script caused the application to restart.

As to discoverability of types... if you want to learn the values for parameters of any command just type it and press Shift+Enter to see the help for it. in this case:

Install-UpdatePackage [[-RollbackPackagePath] <string>] 
    -UpgradeAction <UpgradeAction> {Preview | Upgrade} 
    -InstallMode <InstallMode> {Install | Update}  
    [<CommonParameters>]

AdamNaj added a commit that referenced this issue Aug 26, 2013
@AdamNaj
Copy link
Member

AdamNaj commented Aug 29, 2013

I assume this is resolved as the log suggests. I'm closing it for the release reasons. If that is not the case, please re-open the issue or create a new one.

@AdamNaj AdamNaj closed this as completed Aug 29, 2013
@sharprajat
Copy link
Author

Hi Michael / AdamNaj

Is it possible to remove all the references to the log file (and if possible delete the log file from GitHub permanently) associated with this issue.

The log file contains physical paths and somehow shows up in some search results, which according to our client is a potential security risk.

I do not see a way to edit a post and delete the attachment. Also, not sure if doing that would remove it permanently from the GitHub.

Please do the needful. Let me know if I can be of any help. Since, the client has pointed out this issue, it is very important for us to resolve it at the earliest.

I hope you will understand and help.

Best regards,
Rajat

@michaellwest
Copy link
Member

Hey Rajat, I removed the comment containing the log. Hope this helps.

@sharprajat
Copy link
Author

Thank you Michael. This sure is a great help. Highly appreciate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Need help solving a problem.
Projects
None yet
Development

No branches or pull requests

3 participants