The PowerShell plugin gets an update once again to support Admin mode script collections in addition to the context scripts.

How to write an Admin mode script collections?

<ContextScriptCollection>
  <Title>Statistics Scripts</Title>
  <Description>This script collection ... </Description>
  <Area>Administration</Area>
  <Scripts>
    <ContextScript>
      <Title>Restart Application</Title>
      <Description>The script restarts this instance of EPiServer...</Warning>
      <Script>Restart-Application</Script>
      <Icon>/App_Themes/Default/Images/Tools/Refresh.gif</Icon>
      <Groups>
      </Groups>
    </ContextScript>
  </Scripts>
</ContextScriptCollection>

Where can I access that?

image

Additional changes in this version

Scripts now have access to 3 starting predefined variables:

Name

Sample value

$AppPath

C:\EPiServer\Sites\ExampleEPiServerSite3\

$AppVPath

/ (app virtual folder)

$tempPath

C:\Windows\TEMP

$tmpPath

C:\Windows\TEMP

and 1 more PowerShell Function have been defined: Reset-Application.

[Download & Enjoy]

Includes 3 bonus script collections!

How to install?

Extract the DLL form the ZIP file into the BIN folder of your web application to install the plugin. Remove the DLL to uninstall it.

All feedback appreciated!

Disclaimer ? Responsibility: With great powers comes great responsibility ? this tool can do a lot of harm to a lot of content in a very short time ? backup your system before using the plugin! I will not be held responsible for any use of it. Test your scripts on your development server first! Test on an exact copy of production before running scripts on production content.

Disclaimer ? Security: While the tool requires a membership in either the ?WebAdmin? or ?Administrators? group, to execute, protect it with a <location> entry in web.config, to add another layer of security especially if your administration UI is exposed to the public. Manage your group memberships & rights responsibly!

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...



This entry (Permalink) was posted on Saturday, May 7th, 2011 at 10:23 pm and is filed under .Net Framework, ASP.NET, C#, Code Samples, Downloadable, EPiServer, PowerShell, Software Development, Solution, Web applications. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response , or trackback from your own site.