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,

I am new to pulseway. Have written the following PowerShell script which works fine on my test machine.

Clear-RecycleBin -Force

However when run from pulse way it reports the script has run successfully but nothing is deleted from the recycle bin.

The following error is shown in execution details:

Clear-RecycleBin : The system cannot find the path specified
At C:\Program Files\Pulseway\automation_b6682084_076f_4d67_80a0_0200e70e0897.ps1:1 char:1
+ Clear-RecycleBin -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (RecycleBin:String) [Clear-RecycleBin], Win32Exception
    + FullyQualifiedErrorId : FailedToClearRecycleBin,Microsoft.PowerShell.Commands.ClearRecycleBinCommand
 

I have tried:

cd \
Clear-RecycleBin -Force

But same results.

Is this a permission issue, that does not allow the script to run ?

Featured Replies

  • Author

Hi, doing some research from 

 it looks like Pulseway uses the local system account to run and that has very limited privileges.

Is it possible to elevate Pulseway for the current script being run ?

  • Administrators

Hey @Leon from AIOI Thanks for reaching out. So in response to your first question please enable PowerShell impersonation. Open Pulseway Manager head to settings > Runtime and Enable PowerShell impersonation then you should be able to enter the credential and run the scripts. 

Let me know if that works and if not I will raise a ticket for you with support

Thanks,
Stefan 

  • 2 weeks later...
  • Author

Many thanks Stefan.

Running Clear-RecycleBin -Force requires the user to be impersonated whose recycle bin is being cleared.

This would be a maintenance nightmare as requires each user to have their credentials entered into pulseway client. Then when they change passwords, would need to update.

Could you please raise a ticket for support to see if there is an easy way to auto empty the recycle bin each for users when ever a file has been deleted 7 days or more ago. 

  • Administrators

Hi @Leon from AIOI

No Problem at all, I have just raised a support tickets for you there in which you are CC''d and I will be following the case with you and support. 

If you need anything else please let me know! 

Thanks, 
Stefan 

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.