NAV2013R2 How to disable webservice through powershell?

erwin-mibuso
Member Posts: 8
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
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
0
Comments
-
erwin-mibuso wrote:Set-NAVServerConfiguration -ServerInstance NAVINSTANCE -KeyName 'ODataServicesEnableODataServices' -KeyValue $false
What is the result if you directly give False
Set-NAVServerConfiguration -ServerInstance NAVINSTANCE -KeyName 'ODataServicesEnableODataServices' -KeyValue false?0 -
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.SetNavServerConfiguration0 -
erwin-mibuso wrote:Set-NAVServerConfiguration : The configuration parameter 'ODataServicesEnableODataServices' is not valid for Microsoft Dynamics NAV Server.0
-
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!:thumbsup:
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions