可能重复:
尽管我可以使用替代方法获取当前PS1的所有元素,但我确实希望能够重用它的定义,而不是使用这些替代方法。例如, PS1 element --> Alternate means
======================例如,在我的PS1中,我通过终端转义序列使用粗体蓝色,我希望能够通过计算PS1来简单地重用。
当我尝试使用PSCredentials通过Powershell自动登录到我的服务器上的共享时,我感到困惑。#Login to server to copy installer files to desktopNew-PSDrive -Name P -PSProvider FileSystem -Root \\192.168.1.85\Users2\Ross\Documents\Powershell -Credential Ross
#Copies installer files from se