Jump to content
View in the app

A better way to browse. Learn more.

Pulseway

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Posted

Hi Community,

I just want to share that I am soon going to release my first plugin on Pulseway forum.

The plugin is all about PowerShell, that's why I have decided to call it "PowerOfTheShell"

This plugin is for all those of you that want to run PowerShell script while you are on the go and get the results immediately from with in Pulseway directly on your device.
I use Powershell and C# almost every day in my line of work, so it was just very clear to me that I just had to write a plugin, that I could use with this great software.


Main features are:

  • The menu of PowerOfTheShell including subpages with script commands is easy to configure through a simple layout found in a config XML file.
  • Run any PowerShell script version 1.1, 2.0, 3.0, 4.0 and have the result(s) shown in Pulseway.
  • Supports WINRM scripts, Execute remote commands on several machines/servers and have the results in one place.
  • Last retrieved results including date and time, is always available while Pulseway is running.
  • Select max results to be shown. Good if your script returns a lot of results and you want to control the amount visible.
  • Information about script status Idle/running.
  • Configure plugin impersonation settings from within Pulseway Manager.
  • Support for Nested pages.
  • Support for Pulseway API 3.0 Input Controls.
  • Support for "partial" input control ( run scripts with or without all input values assigned )
  • Support for setting the log level in the plug-in configuration form.

Hope this can be interesting to some. The possibilities is endless if you can script it ;)

Best Regards
Johnni

*Update* 1.5 is out. (28-06-2015)
Download POTS
Please Try it out and let me know what you think :)
Changes:

  • Upon request I have added support for parameters that have spaces in the input controls e.g a string containing firstname and lastname are now seen as one parameter and not two. Making it possible to ask for more complex inputs
  • Build against System.Management.Automation 4.0
  • Code optimization and cleanup

Read the "read me first file" in the zip for more information.

*Script pack V1 is included in the zip.

http://pcm-plugins.blogspot.com/ View this blog I have been setting up for "how to".

post-20-0-10781300-1328294607_thumb.pngpost-20-0-92802600-1328294615_thumb.pngpost-20-0-43203800-1328294632_thumb.pngpost-20-0-53644000-1348762731_thumb.pngpost-20-0-37352900-1348762733_thumb.pngpost-20-0-17656100-1349732476_thumb.png

Edited by Cptrico

  • Replies 86
  • Views 68.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Plugin data entry items are not supported yet but will be added in a future PC Monitor release.

  • Hi all, Just released V1.2 of my plug-in. http://forum.pulseway.com/topic/274-poweroftheshell-plugin-10/page__view__findpost__p__1117 It now supports nested pages in the menu layout, please see doc

  • Hi Paul If you look in the zip you will actually see that you have the release folder that includes a very simple XML with only one script to try out. If you know the plugin and want to go full Mon

Posted Images

Featured Replies

Thanks great plugin. Has anyone else found that if there is no subpage and commands are just on the main page you can no longer access PC Monitor by remote clients.

I.E


<?xml version="1.0"?>

<main>

  <group title="PowerOfTheShell" enabled="True" maxResults="50">

    <page title="Share Management" pageId="1" subtitle="Tools For Shares" enabled="True">

	    <command title="Display Sessions" commandId="1" path="c:\program files\pc monitor\scripts\OpenSessions.ps1" arguments="" />

	    <command title="Display OpenFiles" commandId="2" path="c:\program files\pc monitor\scripts\OpenFiles.ps1" arguments="" />   

    </page>  

  </group>

</main>

Works with subpage

<?xml version="1.0"?>

<main>

  <group title="PowerOfTheShell" enabled="True" maxResults="50">

    <page title="Share Management" pageId="1" subtitle="Tools For Shares" enabled="True">

	  <subpage title="Information" pageId="2" subtitle="Retrive Share Info" enabled="True">

	    <command title="Display Sessions" commandId="1" path="c:\program files\pc monitor\scripts\OpenSessions.ps1" arguments="" />

	    <command title="Display OpenFiles" commandId="2" path="c:\program files\pc monitor\scripts\OpenFiles.ps1" arguments="" />

   </subpage>  

    </page>  

  </group>

</main>

  • Author

Hi Nick

Thanks for using my plugin.

The plugin is designed to have at lest one subpage to work. That's why. If you enable debug you would see a parsing error.

The sole reason is that you have the Group as the starter, which is just a title/header, and then you create a page, which you could think as a menu item that links to some commands/pages and this is where the subpage comes in :)

The page is a link that needs to open up for a new page(subpage) otherwise all the commands for the scripts would be in the main root and you would scroll for ever.

Which was why I decided to wait for 2.9.1 that supported pages so all the thing were not placed in the root.

Let me know if you need help for anything ;)

  • Author

Hi all,

Just released V1.2 of my plug-in. http://forum.pulseway.com/topic/274-poweroftheshell-plugin-10/page__view__findpost__p__1117

  • It now supports nested pages in the menu layout, please see documentation in the zip for more information on how to use this.
  • More information in log(trace) and on the clients themselves if the plugin is having an issue with e.g XML config or scripts.

The package contains like previously config examples ,but also now a script_pack is included with a pre-configured XML file ready to use all of them.

The XML file uses the nested layout to gather everything in one place, looks great.

Please have a look at the (readme-first) before you get started with this,

I could not have provided you this complete example, without all the help from digbyp.Thanks a lot for using my plugin.

Please, if you have any ideas to useful scripts or already uses some that we haven’t added yet, please submit them and I will add them in the next package.

Enjoy.

  • Administrators

It's a great idea, however I think that including them in the packages on a "examples" folder would be better because if you happen to add 50 example scripts the client who just wants to try out the plugin will end up with a pretty big list of scripts to execute :lol: , not that it would be bad tho.

Paul.

  • Author

Hi Paul

If you look in the zip you will actually see that you have the release folder that includes a very simple XML with only one script to try out. If you know the plugin and want to go full Monty. Then you can just use the script pack with a lot of scripts to try out :)

Hi all,

I just have to thank for the great help you gave me with these examples.

Thanks, Johnni and digbyp.

Best Regards

Cesar Lacerda.

  • Author

Hi,

Thanks for using the plugin ;) sorry for the name confusion Paul is digbyp I just sometimes have used digbyp and some times Paul. But it is the same person. Not that I don't want to give Paul Csiki credit :) he has made some cool plugins. But in this case it is Paul Digby. Think I will go for last name for now on :)

correct now!

thank you

  • 5 months later...

Hi all,

Just set mobile pc monitor up on my home pc and server last night, defo something I will be putting forward at work as we're looking into a system management solution!

Anyway, installed the plugin on my server, and pointed to some of my scripts already, works great! (got really confused at first 'cos it doesn't quite like "write-host" and some of my scripts had that in!

I want to be able to run basic commands from the xml, like; "add-pssnapin windows.serverbackup;get-wbsummary" is this possible?

Tried putting the above in path and I get an error:

"The term 'add-ps....' is not recognized as the name of a cmdlet,function..."

Any thoughts?

Thanks,

Ollie

  • Author

Hi there,

You need to always point to a ps1 script in the path. What ever you put in that script will pe parsed and run. The reason that the write-host cmdlet is not working is that as you know it writes to the host console ;-), which is not there since we use a plugin to run the code.

You can put what ever code you want in the ps1 script, please see the script pack for a lot of examples and how to format the output for PCM.

Thanks for using the plugin.

Best regards

Johnni

Hi Johnni,

I thought that would be the reason!

Yeah, I guessed that, could be a nice feature maybe? To have like 'Command' as an alternative to path, that would fire that in the host console?

Very pleased with the results of the plugin so thank you, I've got three useful scripts on Windows Backup if anyone wants me to zip them up and post? :)

Thanks,

Ollie

  • Author

Glad that it works for you.

I am always a sucker for a god script, so I will say yes please :-) share either here or post a link to the scripts. The bigger repo we can gather the better :)

Cheers.

I found that your package is missing some power shell scripts. Could you please check the package again. There were some power shell scripts missing compared to the options given in the application.

  • Author

Hi Shivam,

Could you maybe come with some examples on what is not there as you expect it to be ^_^ The package has not been changed recently.

brgrds

Johnni

  • Author

Hi Ollie,

Looks really good. Will try out your scripts also :)

And thanks.

Brgrds

Johnni

  • 1 month later...
  • Author

Hi all,

Now finally I have released version 1.3 that supports PCM API 3.0 Input controls :)

A whole new range of scripts can now be created and executed from within POTS.

Go and check it out http://forum.pulseway.com/topic/274-poweroftheshell-plugin-13/#entry1117

Please let me know if you have any questions for this build, or you experience any problems.

Thanks again for using my plugin. :)

Cheers

  • Administrators

Awesome work Johnni!

It will do just well on my servers.

Thank you!

  • Author

Thank you... for the support :)

  • 2 weeks later...
  • Author

Hi all,

POTS for PCM v.1.3 came with support for input controls. Now in v.1.4 there is support for “partial input controls”.

And what does that mean. It means that it is now possible to have a script that can run with or without all input controls assigned. Let’s think of a script where running it with only one input control, will generate a different output than running it with 3 or all assigned input controls. This makes it possible to create very flexible scripts that can take different parameters.

Also it is now possible to set the log level of the plugin in the configuration manager.

Check it out, and as always please report back to me if you have any questions or good ideas for improvements.

Cheers. :)

  • 1 month later...

Hi Johnni,

Just found this plug in whilst trying to work out an easy way of running Powershell scripts. I'm a relative novice and still learning so this might sound like a silly questions...

I have installed the plugin into my PC Monitor Manager and I've modified a config.xml to try out however I don't understand where the config should be placed in my folders for the plugin to read it? At the moment I am getting the following error in iOS app...

"Problem detected in the parser, please check the XML file" "Error in the plugin"

  • Author

Hi spcurtis81,

Thanks for trying the plugin :)

the config.xml will be read from the plugin folder, if you place it in where the pcMonitorClient.dll and PowerOfTheShell.dll is then you should be good to go.

If it still says trouble in the parser, then maybe enable diagnostics in Pc Monitor manager under Settings - Diagnostics and remember to include diagnostics logging for plugins.

After that you can try again and find the trace.log located in the Pc Monitor client installation folder, and see what the error is.

Don't hesitate to ask again. :)

,

Thanks Johnni.

It's really embarrassing actually. I forgot to change the config file extension to an XML. I hang my head in shame :wacko:

Thanks for your help.

  • Author

I am glad that it worked for you, there is no stupid questions, so just keep them coming if you have more. :)

  • 5 months later...

This looks like a great tool, but I am having a few problems running it.  I have installed the plugin on one of the servers I support.  I can see the plugin on my mobile and can run the scripts, but I don't get anything displayed after running.

 

I have pasted the trace.log details below - hope someone can help... Thanks:

 

 

4/19/2013, 21:27:50.392: [service] System.NullReferenceException: Object reference not set to an instance of an object.
   at PowerOfTheShell.Program.GetPageDetails(Int32 pageId)
   at .(Object )
4/19/2013, 21:27:56.444: [service] System.NullReferenceException: Object reference not set to an instance of an object.
   at PowerOfTheShell.Program.GetPageDetails(Int32 pageId)
   at .(Object )
4/19/2013, 21:28:02.513: [service] System.NullReferenceException: Object reference not set to an instance of an object.
   at PowerOfTheShell.Program.GetPageDetails(Int32 pageId)
   at .(Object )
4/19/2013, 21:28:14.572: [service] System.NullReferenceException: Object reference not set to an instance of an object.
   at PowerOfTheShell.Program.GetPageDetails(Int32 pageId)
   at .(Object )
4/19/2013, 21:28:20.640: [service] System.NullReferenceException: Object reference not set to an instance of an object.
   at PowerOfTheShell.Program.GetPageDetails(Int32 pageId)
   at .(Object )
4/19/2013, 21:28:24.665: [service] System.NullReferenceException: Object reference not set to an instance of an object.
   at PowerOfTheShell.Program.GetPageDetails(Int32 pageId)
   at .(Object )
4/19/2013, 21:28:30.702: [service] System.NullReferenceException: Object reference not set to an instance of an object.
   at PowerOfTheShell.Program.GetPageDetails(Int32 pageId)
   at .(Object )
4/19/2013, 21:28:34.727: [service] System.NullReferenceException: Object reference not set to an instance of an object.
   at PowerOfTheShell.Program.GetPageDetails(Int32 pageId)
   at .(Object )
4/19/2013, 21:28:50.171: [service] System.NullReferenceException: Object reference not set to an instance of an object.
   at PowerOfTheShell.Program.GetPageDetails(Int32 pageId)
   at .(Object )
4/19/2013, 21:29:16.738: [service] Received Request Plugin page command 'PowerOfTheShell.Program[>x1x2x3x4x5<]905[>x1x2x3x4x5<]905' from device Id: '49c135463987e233'
4/19/2013, 21:29:16.753: [service] System.IO.FileNotFoundException: Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=**************' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=****************
   at PowerOfTheShell.Program.PageCommandReceived(Int32 pageId, Int32 commandId)
   at .(Object )
 
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

 

 

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.