FIX: Error when a SQL Server Agent job runs a PowerShell command to enumerate permissions of the database

Applies to: SQL Server 2016 DeveloperSQL Server 2016 EnterpriseSQL Server 2016 Enterprise Core

Symptoms


Assume that you have Cumulative Update 3, or a later version, for SQL Server 2016 Service Pack 1 installed. If you have a SQL Server Agent job that's running a PowerShell command to enumerate permissions of the database, the job is unsuccessful.

Additionally, you receive the following error message:


Note
Other operations that invoke the EnumDatabasePermissions SMO function may also be unsuccessful and you receive the same error message.

Resolution


The fix for this problem is included in the following updates:

          Cumulative Update 9 for SQL Server 2017

Cumulative Update 1 for SQL Server 2016 Service Pack 2 

Cumulative Update 9 for SQL Server 2016 Service Pack 1

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References


Learn about the terminology Microsoft uses to describe software updates.