Makes it possible to use certificates from the LocalMachine certificate store
Adds check for -NonInteractive switch to avoid hung script when running non-interactively