timabell / ssrs-powershell-deploy

PowerShell scripts to deploy a SQL Server Reporting Services project (*.rptproj) to a Reporting Server
MIT License
75 stars 40 forks source link

Property 'IntegratedSecurity' cannot be found on this object. #7

Closed uwebartels closed 7 years ago

uwebartels commented 9 years ago

Hi,

thanks for the live saving script. :)

it seems that you are trying to use an optional element that doesn't exist in my datasource definition.

I get the following error message:

ForEach-Object : Property 'IntegratedSecurity' cannot be found on this object.
Make sure that it exists.
At C:\Users\Administrator\Desktop\git\ssrs-powershell-deploy\Deploy-SSRSProject
\Deploy-SSRSProject.ps1:285 char:16
+     ForEach-Object <<<<  {
    + CategoryInfo          : InvalidOperation: (.:OperatorToken) [ForEach-Obj
   ect], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFoundStrict,Microsoft.PowerShell.Comm
   ands.ForEachObjectCommand

By commenting lines 118-120 it works well:

    #if ([Convert]::ToBoolean($ConnProps.IntegratedSecurity)) {
    #   $Definition.CredentialRetrieval = 'Integrated'
    #}

Better would be of course to check if this parameter is set.

alensiljak commented 8 years ago

The authentication might not be set (or is set to No Authentication). But yes, it might be better if this parameter was not mandatory.

carpnick commented 8 years ago

Fixed with PR