I'm working on a SPE script to execute when a workflow state is hit.
I've been trying to get the context item in the script, using the command Get-Item . (as I understand it, this should get the context item).
Instead of getting the context item, I get the home node.
I've tried rebuilding the links database and reindexing the Master and Web databases, to no avail.
I guess I have a few questions -
- Is that the correct way to get the context item in a SPE 6.4 script? If it's changed, how is it done now? (Some of the articles are a few years old)
- Is there another option for getting the context item? I haven't been able to find anything.