且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

有没有办法在powershell中转义字符串,如@“string"?在 C# 中

更新时间:2022-06-12 00:26:51

要在 Powershell 中逐字引用字符串,只需使用单引号:

To quote verbatim strings in Powershell, just use single quotes:

'D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)'

Get-Help about_Quoting_Rules

这里