Hangfire.PowerShellExecutor 1.0.0

.NET Standard 2.1
There is a newer version of this package available.
See the version list below for details.
dotnet add package Hangfire.PowerShellExecutor --version 1.0.0
NuGet\Install-Package Hangfire.PowerShellExecutor -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Hangfire.PowerShellExecutor" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Hangfire.PowerShellExecutor --version 1.0.0
#r "nuget: Hangfire.PowerShellExecutor, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Hangfire.PowerShellExecutor as a Cake Addin
#addin nuget:?package=Hangfire.PowerShellExecutor&version=1.0.0

// Install Hangfire.PowerShellExecutor as a Cake Tool
#tool nuget:?package=Hangfire.PowerShellExecutor&version=1.0.0


NuGet NuGet MIT License

A plugin for Hangfire that allows you to easily launch your powershell scripts.

Read about hangfire here: https://github.com/HangfireIO/Hangfire here: http://hangfire.io


  • Noob Friendly: Allow to easily launch your powershell scripts.
  • 100% Safe: no Hangfire-managed data (e.g. jobs, states) is ever updated, hence there's no risk to corrupt it.
  • (blah-blah-blah)


Install NuGet package, and configure the console in .NET Core's Startup.cs:

public void ConfigureServices(IServiceCollection services)
    services.AddHangfire(config =>



NOTE: If you have Dashboard and Server running separately, you'll need to call UseConsole() on both.


using Hangfire.Console;
using Hangfire.Server;
using System.Threading;
using System.Threading.Tasks;

namespace Hangfire.PowerShellExecutor.Jobs
    public class PowerShellJob
        public async Task ExecuteAsync(PerformContext context, CancellationToken cancellationToken)
            context.WriteLine("Starting: Hangfire Script");

            // Create an instance of the configuration
            var psConfig = new PsExecutorConfig();
            // Define the execution policy
            // Add parameters
            psConfig.AddSecret("PE_SUPERSECRET", "P@ssw0rd");
            psConfig.AddParameter("PE_PARAMETER01", "parameter01");
            psConfig.AddParameter("PE_PARAMETER02", "parameter02");
            // Set the location of the powershell script
            // Execute the powershell script
            context.StartProcess(psConfig, cancellationToken);

            context.WriteLine("Finishing: Hangfire Script");


Authored by: Thomas ILLIET

This project is under MIT license. You can obtain the license copy here.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.7 557 12/14/2021
1.1.6 267 11/10/2021
1.1.5 260 11/4/2021
1.1.4 238 11/1/2021
1.1.3 246 9/2/2021
1.1.2 229 9/1/2021
1.1.1 284 7/11/2021
1.1.0 258 7/6/2021
1.0.1 301 7/4/2021
1.0.0 396 7/3/2021