$s = [Microsoft.SharePoint.SPSite]("http://site")
$w = $s.OpenWeb()
$l = $w.Lists["IssueList"]
$l.Items.ModerationInformation #Should be Pending
$l.Items.ModerationInformation.Status = [Microsoft.SharePoint.SPModerationStatusType]::Approved
$l.Items.ModerationInformation.Comment = "Test"
... item remains stuck in "Pending".
What am I missing here?
Note: the above PowerShell is wrong.
You need to set a variable to the item - e.g. $i = $l.Items and then operate on the variable (or use $_ in a foreach loop). This now works.
Not sure why the "Manage Content and Structure" tool doesn't work.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?