There is a script "TapToPlace.cs". You can attach it to any game object to move it around and place it on any surface.
/// The TapToPlace class is a basic way to enable users to move objects
/// and place them on real world surfaces.
/// Put this script on the object you want to be able to move.
/// Users will be able to tap objects, gaze elsewhere, and perform the
/// tap gesture again to place.
/// This script is used in conjunction with GazeManager, GestureManager,
/// and SpatialMappingManager.
/// TapToPlace also adds a WorldAnchor component to enable persistence.
I had a strange issue with newly instantiated prefabs that shoud be moveable (IsBeingPlaced=true) from the beginning of their lifecyle. In the editor it works fine, but in the HoloLens the new objects didn't move. A quick workaround was to wait some milliseconds before setting the property to true. Then it worked like a charm.