LiHMDS is commercially available, but it can also be prepared by the deprotonation of bis(trimethylsilyl)amine with n-butyllithium. This reaction can be performed in situ.
Once formed, the compound can be purified by sublimation or distillation.