i am trying to update the Database connectionstring changes:
Import-Module SqlServer
$newConnectionString = "Connection Timeout=60;User Id=SOME_NEW_ID;Data Source=10.10.19.10;Persist Security Info=True;Session Character Set=UTF8"
$svr = new-Object Microsoft.AnalysisServices.Tabular.Server
$svr.Connect("server1.domain.com")
$svr.databases[1].model.datasources[0].ConnectionString = $newConnectionString
$svr.Databases[1].model.datasources[0].Update(UpdateOptions.ExpandFull)
But i am getting errors:
Unexpected token 'UpdateOptions.ExpandFull' in expression or statement.
if i do regular Update():
$svr.Databases[1].model.datasources[0].Update()
i get this:
Method invocation failed because [Microsoft.AnalysisServices.Tabular.ProviderDataSource] does not contain a method named 'Update'
and if i try SaveChanges():
$svr.Databases[1].Model.SaveChanges()
I get this error:
The following exception occurred while retrieving member "SaveChanges": "Encountered an invalid type for a default value."
if i try just ExpandFull
$svr.Databases[1].model.datasources[0].Update(ExpandFull)
i get
Unexpected token 'ExpandFull' in expression or statement.