Azure devops 使用WinRM部署IIS Web应用程序未转义用户名中的$

Azure devops 使用WinRM部署IIS Web应用程序未转义用户名中的$,azure-devops,azure-devops-extensions,Azure Devops,Azure Devops Extensions,我正在尝试使用此Microsoft任务在iis中创建新网站。配置参数之一是具有在目标计算机中进行更改的权限的用户名。这很好,但是提供给我的用户名正好有一个$作为名称的一部分。假设用户名值类似于MyDomain\AAA$BBB$CCC,这会完全扰乱执行,可能是因为$未正确转义。如果我使用了一个没有$everything的登录名,那么一切都会正常工作。在没有运气分配任务之前,我已经尝试过各种方法来逃避美元。有什么办法可以解决这个问题吗 日志: 你得到的真正的错误信息是什么拒绝访问或其他什么?我包含了

我正在尝试使用此Microsoft任务在iis中创建新网站。配置参数之一是具有在目标计算机中进行更改的权限的用户名。这很好,但是提供给我的用户名正好有一个$作为名称的一部分。假设用户名值类似于MyDomain\AAA$BBB$CCC,这会完全扰乱执行,可能是因为$未正确转义。如果我使用了一个没有$everything的登录名,那么一切都会正常工作。在没有运气分配任务之前,我已经尝试过各种方法来逃避美元。有什么办法可以解决这个问题吗

日志:


你得到的真正的错误信息是什么<代码>拒绝访问或其他什么?我包含了试图创建iis站点和应用程序池的任务的日志。请注意脚本如何尝试在用户目录C:\Users\AAA\AppData\Local\temp\eef005c2-……下执行临时脚本。。。。。。。但是,用户名是AAA$BBB$CCC。如果我使用不带$的用户,则临时脚本将使用正确的用户文件夹,并且一切正常。在用户名周围加上
'
'
,会有一点不同吗<代码>域\用户名,“域\用户名”,域`Username`。。。
> 2020-09-23T13:34:06.2439758Z ##[section]Starting: Manage IISWebsite
2020-09-23T13:34:06.2452475Z ==============================================================================
2020-09-23T13:34:06.2452600Z Task         : WinRM - IIS Web App Management
2020-09-23T13:34:06.2452664Z Description  : Connect via WinRM, to create or update a Website, Web App, Virtual Directories, and Application Pool locally on IIS
2020-09-23T13:34:06.2452725Z Version      : 3.0.0
2020-09-23T13:34:06.2452763Z Author       : Microsoft Corporation
2020-09-23T13:34:06.2452805Z Help         : [More Information](http://aka.ms/IISMgmt)
2020-09-23T13:34:06.2452858Z ==============================================================================
2020-09-23T13:34:09.4989327Z Starting remote execution of Invoke-Main script for "IISWebsite" with action "CreateOrUpdateWebsite"
2020-09-23T13:34:10.7101893Z PSSession created for Machines:'BBBAPP05'
2020-09-23T13:34:12.5340174Z ================================================ BBBAPP05 ================================================
2020-09-23T13:34:12.5942534Z ##[command]& 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\Users\AAA$BBB$CCC\AppData\Local\Temp\eef005c2-911f-48e6-9a83-7ee59496b299.ps1'"
2020-09-23T13:34:42.6124922Z ================================================ BBBAPP05 ================================================
2020-09-23T13:34:42.7415929Z . : The term 'C:\Users\AAA\AppData\Local\Temp\eef005c2-911f-48e6-9a83-7ee59496b299.ps1' is not recognized as the name 
2020-09-23T13:34:42.7417078Z At line:1 char:1
2020-09-23T13:34:42.7417328Z + & 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -NoLogo -NoProfile ...
2020-09-23T13:34:42.7417499Z + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-09-23T13:34:42.7417571Z     + CategoryInfo          : NotSpecified: (. : The term 'C...ed as the name :String) [], RemoteException
2020-09-23T13:34:42.7419615Z     + FullyQualifiedErrorId : NativeCommandError
2020-09-23T13:34:42.7420351Z  
2020-09-23T13:34:42.7421348Z 
2020-09-23T13:34:42.7855083Z 
2020-09-23T13:34:42.7943983Z of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, 
2020-09-23T13:34:42.7944127Z 
2020-09-23T13:34:42.7946475Z 
2020-09-23T13:34:42.8236229Z 
2020-09-23T13:34:42.8299665Z verify that the path is correct and try again.
2020-09-23T13:34:42.8299832Z 
2020-09-23T13:34:42.8303916Z 
2020-09-23T13:34:42.8409026Z 
2020-09-23T13:34:42.8478481Z At line:1 char:3
2020-09-23T13:34:42.8479137Z 
2020-09-23T13:34:42.8479391Z 
2020-09-23T13:34:42.8580860Z 
2020-09-23T13:34:42.8645911Z + . 'C:\Users\AAA\AppData\Local\Temp\eef005c2-911f-48e6-9a83-7ee59496b299.ps1'
2020-09-23T13:34:42.8646010Z 
2020-09-23T13:34:42.8647804Z 
2020-09-23T13:34:42.8762679Z 
2020-09-23T13:34:42.8827401Z +   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-09-23T13:34:42.8828235Z 
2020-09-23T13:34:42.8830818Z 
2020-09-23T13:34:42.8938514Z 
2020-09-23T13:34:42.9003212Z     + CategoryInfo          : ObjectNotFound: (C:\Users\AAA\Ap...ee59496b299.ps1:String) [], CommandNotFoundException
2020-09-23T13:34:42.9003413Z 
2020-09-23T13:34:42.9005450Z 
2020-09-23T13:34:42.9112517Z 
2020-09-23T13:34:42.9174709Z     + FullyQualifiedErrorId : CommandNotFoundException
2020-09-23T13:34:42.9174967Z 
2020-09-23T13:34:42.9177224Z 
2020-09-23T13:34:42.9280850Z 
2020-09-23T13:34:42.9342560Z  
2020-09-23T13:34:42.9343493Z 
2020-09-23T13:34:42.9345033Z 
2020-09-23T13:34:42.9451075Z 
2020-09-23T13:34:44.1700359Z ##[error]Non-Zero exit code: '1' for ComputerName: 'BBBAPP05'
2020-09-23T13:34:44.2602724Z ##[section]Finishing: Manage IISWebsite