What you're looking for is:
defaults write /Library/Preferences/com.apple.desktopservices DSDontWriteNetworkStores -string true
Thanks, @bpavlov . Kind of annoying that -bool worked in 10.10 and it you're writing a value of true, why is it a string and not boolean?
I'm surprised that work for you in 10.10. it's always been a string from what apple documented. I wish I could find the KB but I believe it was documented as:
defaults write /Library/Preferences/com.apple.desktopservices DSDontWriteNetworkStores true
Which if you are specifying the key type, it defaults to 'string'. Why a string for this particular preference? Not sure, gotta talk to the dev at Apple who implemented that preference.
I've heard from AppleCare that this no longer works — but the agent may not have known about or tried the string vs. the Boolean.
So given the article posted by @donmontalvo it seems like the new way of doing it is in fact with a bool. Should this be effective for all users of the device though? Can I add that defaults write into our "setup script" and it will be globally applied to any user that logs in?
Our security is not particularly happy about all the .DS_Store files being dropped by all of our Mac users on our network shares.