Powershell复制到%appdata%mozilla配置文件

问题描述 投票:0回答:1

我在Powershell代码方面遇到问题:我在命令行(CMD)中制作了脚本,此脚本有效,但在活动目录中却无法正常工作我将使脚本将文件从服务器复制到%appdata%没有名称文件夹firefox为配置文件目录示例创建随机名称:sadadasasda.default或d4sfsx.default-release我必须将文件从服务器复制到配置文件目录,但是我不知道如何捕获目录名。感谢您的帮助

$UserLogo=$env:UserName

Copy-Item -Path \\server\... -Destination C:\Users\$UserLogo\AppData\Roaming\Mozilla\Firefox\Profiles\*.default
Copy-Item -Path \\server\... -Destination C:\Users\$UserLogo\AppData\Roaming\Mozilla\Firefox\Profiles\*.default-release
powershell firefox cmd copy mozilla
1个回答
0
投票

使用Get-ChildItem从“个人档案”文件夹中获取内容,然后尝试使用它们

© www.soinside.com 2019 - 2024. All rights reserved.