add common powershell function
add common powershell function

original commit: vintage-software/vstack@9e5523a754825a1169436cbe3d22257cd73919d4

split from e6f1a85652199c1f9db4797516b37b4422dcf645

vintage-software/vstack