NAV2013R2 How to disable webservice through powershell?

erwin-mibusoerwin-mibuso Member Posts: 8
edited 2015-01-07 in NAV Three Tier
Hi all,

I've tried the following commands;

This one works fine (just to test setting a boolean in powershell):
Set-NAVServerConfiguration -ServerInstance NAVINSTANCE -KeyName 'NASServicesEnableDebugging' -KeyValue $True

Now i want to disable the webservices, but the line beneath does not work, it gives me the mssage " is not valid for microsoft dynamics nav server".
Set-NAVServerConfiguration -ServerInstance NAVINSTANCE -KeyName 'ODataServicesEnableODataServices' -KeyValue $false

I am looking for the right command to disable the webservices from powershell. Can anyone help me with the syntax?
Unfortunately i cannot seem to find the right answer with google and the search.

The build i am using: NAV2013R2 Rollup 12 Build 38053

Thanks in advance

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Set-NAVServerConfiguration -ServerInstance NAVINSTANCE -KeyName 'ODataServicesEnableODataServices' -KeyValue $false
    Is $false a variable?

    What is the result if you directly give False
    Set-NAVServerConfiguration -ServerInstance NAVINSTANCE -KeyName 'ODataServicesEnableODataServices' -KeyValue false?
  • erwin-mibusoerwin-mibuso Member Posts: 8
    No it is not a variable, thats the strange thing although the change has been made and powershell says;

    WARNING: The new settings value will not take effect until you stop and restart the service.


    When i run the script for the webservice, with or without the $ it gives me the same result (translated the first line to english);

    Set-NAVServerConfiguration : The configuration parameter 'ODataServicesEnableODataServices' is not valid for Microsoft Dynamics NAV Server.
    At line:8 char:1
    + Set-NAVServerConfiguration -ServerInstance NAVINSTANCE -KeyName 'ODataServicesEn ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (0:Int32) [Set-NAVServerConfiguration], NavConfigurationException
    + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$NAVINSTANCE,Microsoft.Dynamics.Nav.Management.Cmdlets.SetNavServerConfiguration
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Set-NAVServerConfiguration : The configuration parameter 'ODataServicesEnableODataServices' is not valid for Microsoft Dynamics NAV Server.
    Shouldn't it be ODataServicesEnabled instead of ODataServicesEnableODataServices?
  • erwin-mibusoerwin-mibuso Member Posts: 8
    This is indeed the right syntax, it works.
    I figured since it "NASServicesEnableDebugging" was working it needs the fasttab name first, followed by the fieldname but apparently that was not the case.
    For the webservice booleans it required your syntax, it works fine now thanks alot for your help Mohana! :D :thumbsup:
Sign In or Register to comment.