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 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy