I am moving workflow state through Powershell script to approved state. However, it is not publishing that item in the web database.
Code:-
$item.Editing.BeginEdit()
$item.__Workflow=$workflowId
$item."__Workflow state"=$workflowStateId
$item."__Default Workflow"=$workflowId
$item.Editing.EndEdit($false,$false)
$item.Fields["__Workflow state"].Value = $workflowStateId