小编bgr*_*gor的帖子

PowerShell桌面变量

我正在尝试编写PowerShell脚本,以便在通过sccm安装后删除Chrome的桌面图标.但是,网络中的某些用户将其桌面定向到网络上的不同文件夹.PowerShell中是否存在存储桌面位置的变量?

我已经在网上搜索并使用了搜索Get-Variable | Out-String,但我没有找到任何东西.完成的代码应如下所示:

If (Test-Path "$DesktopLocation\Google Chrome.lnk"){
    Remove-Item "$DesltopLocation\Google Chrome.lnk"
}
Run Code Online (Sandbox Code Playgroud)

powershell desktop

26
推荐指数
3
解决办法
4万
查看次数

标签 统计

desktop ×1

powershell ×1