PowerShell script to changeSharepoint Designer workflow statuses

rameez hasan 6 Reputation points
2021-07-30T07:50:00.643+00:00

I want to change the status of workflow using powershell script.

If you go into workflow settings in a library in Sharepoint, and click on Remove a workflow, you see the 3 settings I'm referring to: "Allow", "No New Instances", and "Remove".

I'm thinking there must be a way to update these workflow settings from a powershell script.

based on forur parameters:

Param 1 - Site URL
Param 2 - List/Library Name
Param 3 - Workflow Name
Param 4 - Status of WF ("Allow", "No New Instances", and "Remove")

Does anyone know how?

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,031 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
599 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,547 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.