Access is denied msg after scheduled powershell script uses Quest ActiveRoles 7.1 Management Shell

My customer asked me to create scheduled task uses cmdlets from Quest ActiveRoles 7.1 Management Shell. Missing documentation caused my long fight with ‘Access is denied’ monster.

Fully Qualified Error ID = System.UnauthorizedAccessException,Quest.ActiveRoles.ArsPowerShellSnapIn.Commands.RemoveGroupMemberCmdlet2

System.UnauthorizedAccessException: Access is denied.
at System.DirectoryServices.Interop.UnsafeNativeMethods.IAds.SetInfo()
at System.DirectoryServices.DirectoryEntry.CommitChanges()
at Quest.ActiveRoles.ArsPowerShellSnapIn.DirectoryAccess.AdsiDirectoryObject.SetInfo()
at Quest.ActiveRoles.ArsPowerShellSnapIn.BusinessLogic.ObjectCache.Save(IEnumerable`1 controls)
at Quest.ActiveRoles.ArsPowerShellSnapIn.Commands.RemoveGroupMemberCmdlet2.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()

But solution is so easy, you have to first use this cmdlet

Connect-QADService -Service "quest_server.fqdn" -Proxy

Office 365 PowerShell Basics

To connect to Office 365 you need to download and install “Microsoft Online Services Sign-in Assistant” and to know how to do it. There are some tips.

Another cmdLet commands to get Exchange Server version

Run under PowerShell on Exchange Server: