# encoding: ascii
# api: powershell
# title: New-DesktopIni
# description: Create a desktop.ini in your PowerShell folder setting the icon and messing with the display name.
# version: 1.0
# type: class
# author: Joel Bennett
# license: CC0
# x-poshcode-id: 5865
# x-archived: 2015-05-23T02:30:54
# x-published: 2015-05-21T03:40:00
#
#
$di = [System.IO.FileInfo]"$(split-path $Profile -Parent)\desktop.ini"
set-content $di "[.ShellClassInfo]`r`nLocalizedResourceName=1$([char]160)WindowsPowerShell`r`nIconResource=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe,0`r`n[ViewState]`r`nFolderType=Documents"
$di.Attributes = $di.Attributes -bor [IO.FileAttributes]"System,Hidden" -bxor [IO.FileAttributes]"Archive"
