NFS Server feature status

Hi,
I would like to check if NFS server feature is installed on Windows server or not. Using this relevence but not getting any value/error.

Q:select objects “* from Win32_ServerFeature where name = ‘FS-NFS-Service’” of wmi
T: 429.587 ms

there is results only if the feature is installed - it clearly states that in the documentation of the class.

That said, your relevance is not built correctly. The class contains technically the “display name” of the feature, not the name, so you should be querying it with that. Also, the query requires double-quotes to work, since those indicate string in relevance you need to escape them by convert them to ASCII characters (%22):

Try this:
q: exists select objects “* from Win32_ServerFeature where name = %Server for NFS%22” of wmi

Thanks

it works after some changes, here is the updated one -
Q:exists select objects “* from Win32_ServerFeature where name = ‘Server for NFS’” of wmi
A: True
T: 1286.367 ms

1 Like