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

Make Sitecore session exposed to scripts in Windows Powershell #7

Closed
AdamNaj opened this issue Jul 7, 2013 · 4 comments
Closed

Make Sitecore session exposed to scripts in Windows Powershell #7

AdamNaj opened this issue Jul 7, 2013 · 4 comments
Assignees
Labels
area-platform improvement Extra sugar and spice. on-hold Can't get to this right now. Need to let it sit for a bit.
Milestone

Comments

@AdamNaj
Copy link
Member

AdamNaj commented Jul 7, 2013

As requested on the Marketplace Console Page
http://marketplace.sitecore.net/en/Modules/Sitecore_PowerShell_console.aspx

SHING CHEN
08:07 PM on Jul 1, 2013

Hi Adam,

The sitecore powershell is very nice. Is it possible to use the features in the standard powershell console? In other words, can i register any of your libraries to import them to the standard powershell console and use them there?

Thanks,
Shing

@michaellwest
Copy link
Member

I was asked today about designing the module so that you could plugin your own provider and still get the benefits of the powershell web service. I think of it like how could someone plugin their own SharePoint provide and still gain access to the powershell functionality as seen in the web service.

@AdamNaj
Copy link
Member Author

AdamNaj commented Oct 24, 2013

This is definitely important I just want to be cautious about how to do this.

@michaellwest
Copy link
Member

I completely agree. I suppose in the planning of Issue #125 we can figure out how this should be done.

AdamNaj added a commit that referenced this issue Nov 18, 2013
AdamNaj added a commit that referenced this issue Dec 16, 2013
Fizes to Zen Garden tenant creation
Issues #136, #135,
Improvements for Issue #7
@AdamNaj
Copy link
Member Author

AdamNaj commented Jan 14, 2014

Finalized in commit 5d5ed4c. To enable remoting in your Windows PowerShell console copy the content of
/sitecore/system/Modules/PowerShell/Script Library/Functions/Remoting script and execute in your environment and then use it as follows:

  • Sample Execute Script Block on a Sitecore Server:
Set-SitecoreConfiguration 'http://hostname' 'admin' 'b'
Invoke-SitecoreScript { get-item master:\content\ } @{name = "value"}
  • Sample upload local C:\image.png to a Sitecore Server to "/sitecore/ media library/Path/an_image.png" path:
Set-SitecoreConfiguration 'http://hostname' 'admin' 'b'
Get-Item C:\image.png | Upload-SitecoreFile -remotePath "Path\an_image.png"

Naturally update the host name, credentials and parameters with the ones meeting your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-platform improvement Extra sugar and spice. on-hold Can't get to this right now. Need to let it sit for a bit.
Projects
None yet
Development

No branches or pull requests

2 participants