December 10, 2018 at 8:56 am
It is easy to use AMO via Powershell or C# to get server properties but even though the docs say that there are also setters for these properties, they don't seem to do anything?
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices") | Out-Null;
[Microsoft.AnalysisServices.Server] $srv = New-Object Microsoft.AnalysisServices.Server;
[string]$ServerName = "Server\Instance";
$srv.Connect($ServerName);
$srv.ServerProperties.Item("DSO\LocksDirectory").Value = "D:"
$srv.ServerProperties.Item("DSO\LocksDirectory")
$srv.Disconnect();
This returns empty, nomatter what property I try to set and there are no changes if I look in SSMS either. Has anyone managed to ser properties? The user doing this is an Administrator on the server instance. Same problem in C#.
December 10, 2018 at 9:54 am
Answering my own question.
It works if you use, after setting the property:
$srv.Update()
For some reason, this method, along with others like .Connect() is missing from the curent docs on the MS website for some reason.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply