How to create desktop.ini in PowerShell?
问题 My goal is to customize all folder icon if the foder's name end by "_S" So i writed a PowerShell function but the customize doesn't work. I took inspiration from: Website to set attribute on desktop.ini Function that sets a custom folder icon function Set-icon_Folder_S($path) { $ini = '[.ShellClassInfo] IconIndex = 0 IconResource=C:\private.ico,0 ConfirmFileOp = 0 DefaultDropEffect = 1' Set-Location $path #List all folder end with _S $items = Get-ChildItem -Recurse | Where-Object {($_