Skip to content

Instantly share code, notes, and snippets.

View gonzalc's full-sized avatar

Calvin Gonzales gonzalc

View GitHub Profile
@gonzalc
gonzalc / logon.ps1
Last active December 11, 2023 11:58
Run PowerShell script without displaying a window
$ErrorActionPreference = 'SilentlyContinue'
$fs = 'fileserver'
$drive = @{
'Personal' = '\\{0}\{1}' -f $fs, $env:USERNAME
'Training' = '\\{0}\Training' -f $fs
'Transfer' = '\\{0}\Transfer' -f $fs
}
New-PSDrive -Name 'P' -PSProvider FileSystem -Root $drive.Personal -Description 'Personal Files' -Persist
New-PSDrive -Name 'T' -PSProvider FileSystem -Root $drive.Training -Description 'Training Files' -Persist
@gonzalc
gonzalc / Microsoft.PowerShellISE_profile.ps1
Last active June 4, 2023 05:46
This contains my PowerShell profiles and IDE configuration.
# $env:OneDrive\Documents\WindowsPowerShell
$HOST.UI.RawUI.WindowTitle = "Windows PowerShell ISE - {0}" -f $PSVersionTable.PSVersion.ToString()
$psISE.PowerShellTabs.SelectedPowerShellTab.ShowCommands = $false
$psISE.Options.SelectedScriptPaneState = 'Right'
$psISE.Options.SelectedScriptPaneState = 'Top'
######################
# DEFAULT PARAMETERS #
######################