The function is working, but I am missing nice example. Command should have PSCredential object and it should connect to something. Optionally, I can run some commands before/after but this code will be fixed. User should enter some demo credentials and do something nice.