Posts

Showing posts from July, 2017

My PowerShell Profile

Image
Here is the script I use for my PowerShell Profile




<# Kris Gross PS Profile Email: KrisGross@sccmtst.com Website: sccmtst.com#>$Shell=$Host.UI.RawUI$shell.BackgroundColor="Black"$shell.ForegroundColor="Magenta"$shell.WindowTitle="PowerShell"$size=$Shell.BufferSize$size.width=350$size.height=10000$Shell.BufferSize=$size$size=$Shell.WindowSize$size.width=150$size.height=50$Shell.WindowSize=$size$host.PrivateData.ErrorForegroundColor="red"$ExecutionPolicy=Get-ExecutionPolicyIf($ExecutionPolicy-ne"Unrestricted"){Set-ExecutionPolicyUnrestricted}Set-Location"$Env:SystemDrive\"FunctionImport-SCCMModule{Set-Location'F:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\'Import-Module.\ConfigurationManager.psd1-verbose:$falseWrite-Host"Setting location to SCCM Site..."Set-Location<SITECODE>}#Get software on a workstationFunctionGet-SoftwareInfo{<#.SYNOPSIS Script to s…