Public/Import/Import-GroupISETheme.ps1
function Import-GroupISETheme { <# .Synopsis This is a function that Imports themes based on them being in ps1xml files stored in a directory that you give it .DESCRIPTION This is used internally by Add-ISETheme (so should be a Private Function) to Import ISE Theme files into the ISE .EXAMPLE Import-GroupISETheme -Directory C:\ISEThemes\ #> [cmdletbinding()] Param ( [Parameter(Mandatory=$True)] [ValidateNotNullOrEmpty()] [string] $Directory ) If (!(Test-Path 'HKCU:\Software\Microsoft\PowerShell\3\Hosts\PowerShellISE\ColorThemes')) { New-Item -Path 'HKCU:\Software\Microsoft\PowerShell\3\Hosts\PowerShellISE' -Name ColorThemes –Force | out-null } Get-ChildItem $Directory -Filter *.ps1xml -Recurse | Select-Object -ExpandProperty fullname | Import-ISEThemeFile } |