Hi Friends,
I am working on custom SSharePointtimer job. Which executes the PowerShell script.
I have taken an Empty Sharepoint Project template and develop the code for timer job to run the PowerShell script from C#.
The deployment was successfully done, but when to run this timer job it failed.
In Log history the following error showing,
The type initializer for ‘System.Management.Automation.SessionStateScope’ threw an exception.Â
I read so many blogs and sites, but unfortunately, no one solution helps me.
Please provide a proper solution for this one.
Thanks in advance friends.