refactor winrm to share summary code with wecutil