How to preconfigure wifi on Mac OS X (Yosemite)? Does anyone knows a way to preconfigure a WPA2 WiFi network on Mac OS X (Yosemite)?

I'm preparing an iMac for a friend and would like to setup his home WiFi while currently far away from the network.

I know all the WiFi parameters (SSID, security, key) but can't manage to validate the manual setup through the AirPort wizard.
I also tried to manually add the entry in Keychains, but can't manage to add the confirmation exceptions on "airportd" and "AirPort" binaries in the ACL part.

Thus, I can't setup transparently and remotely the WiFi connection.
Go to the network preferences panel in System Preference
Select airport, then 'Advanced...' 
Press the plus button 


It will work even when the network isn't near.