Configuring the ISE

I tend to flatten my laptop about once a season. Among the other things I lose is my PowerShell_ISE customizations. They’re not many, but I miss them when I have to live without them. Fortunately, they’re all captured in my Microsoft.PowerShellISE_profile.ps1: #$PSModuleAutoLoadingPreference = ‘None’; @(     "C:\Users\timdunn\Config\PSHModules\ISESteroidsV1\ISESteroids.psd1",     "C:\Users\timdunn\Config\PSHModules\PSReadLine\PSReadline.psd1" ) | %{     if (Test-Path…

0

#StupidProfileTrick – FunctionList

As I previously posted, my $Profile is stupidly complicated, and it adds a ton of functions.  Which ones did I add? (Reason this is of interest to me is because I mistakenly named a function with the same name as a cmdlet.  Yeah, totally stupid move on my part.  More on that later.) #region start…

0

Stupid Profile Trick: $PROFILE as Module

I’m spending a lot of time on my $PROFILE for some reason.  Don’t tell my boss. 🙂 Anyhow, we know that Get-Module will get you a list of modules, and Get-ChildItem Function:\ | Select-Object –Property Name, Module will show you what functions you have loaded from those modules. However, functions loaded in $PROFILE won’t show…

0

Prompts

What does your function:\prompt look like?  Here’s mine: function prompt { if ($Host.IsAdministrator -eq $null) { $CurrentUser = [Security.Principal.WindowsIdentity]::GetCurrent(); $CurrentUserPrincipal = New-Object Security.Principal.WindowsPrincipal $CurrentUser; $AdminRole = [Security.Principal.WindowsBuiltinRole]::Administrator; Add-Member -InputObject $global:Host -Name IsAdministrator -MemberType NoteProperty -Value ( [bool](($CurrentUserPrincipal).IsInRole($AdminRole)) ); } # if ($Host.IsAdministrator -eq $null) # setting the titlebar $host.UI.RawUI.WindowTitle = ” $( $path = Get-Location;…

0

CorpNet ProjectFunctionLibrary.psm1

Sorry, nothing really intranet related here.  Instead, I have a few lines of code from my CorpNet ProjectFunctionLibrary.psm1 that I want to share for managing this system. Update-ProfileSystemProfile: The goal for this system is to have the same code in each project’s $PROFILE, which is then replicated out via the subst.exe and \\tsclient\p drives.  However,…

0

$PROFILE and RDP Sessions

Let’s start with the design discussion first. Problem Statement: I need to RDP onto multiple machines in multiple labs for multiple projects.  Each project has its own customizations to my $PROFILE. I need a way to keep all those files up-to-date and yet accessible. Firstly, my desktop’s $PROFILE isn’t a good start – it has…

0