If I run the cmdlet in a script using powerCLI console it works fine.
If I run the same script as a service, it fails. Everything else works fine, including connection, inventory collection, all other cmdlets, etc etc..all fine except Get-Compliance.
What could be wrong here ...
Get-Compliance (Get-Folder -noRecurssion)
VMware.VimAutomation.Types.VimException: 07.01.2011 10:15:17 Get-Compliance 14292DEE-AD89-4399-AC1C-1765F7C84029 Error occured while executing cmdlet: Get-Compliance. Check inner exception for more details. ---> System.Web.Services.Protocols.SoapException: Access to the Channel integrity checks of this process has been denied.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at IntegrityApi.IntegrityService.GetComplianceStatus(ManagedObjectReference _this, ManagedObjectReference entity) at VMware.VumAutomation.Client40.UpdateManager.GetComplianceStatusFilterByStatusAndBaseline(ManagedObjectReference entity, Nullable`1 complianceStatus, Baseline[] baselines) at VMware.VumAutomation.Client40.UpdateManager.GetComplianceStatus(InventoryItem entity, IDictionary`2& allPatches, Nullable`1 complianceStatus, Baseline[] baselines, Boolean isDetailed) at VMware.VumAutomation.Commands.GetCompliance.DoWorkVum(IVumClient client, List`1 moList) --- End of inner exception stack trace ---