-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMicrosoft.Powershell_profile.ps1
36 lines (30 loc) · 1.17 KB
/
Microsoft.Powershell_profile.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Set Window Title
[System.Console]::Title = "Jorge Fucken Cisneros"
# Set shell prompt
Function prompt {"`n$(gl)`n`n:)~ "}
# Import personal modules
Import-Module $home\Documents\WindowsPowerShell\Internet
Import-Module $home\Documents\WindowsPowerShell\Github
Import-Module $home\Documents\WindowsPowerShell\Functions
Import-Module $home\Documents\WindowsPowerShell\Outlook
Import-Module $home\Documents\WindowsPowerShell\Work
Import-Module $home\Documents\WindowsPowerShell\Variables
# Pull the most recent files from github for profile
cd $home\Documents\WindowsPowerShell\
pull
cc
# Update applications
Function update {
wsl --update
winget upgrade --silent --all --include-unknown --accept-package-agreements --accept-source-agreements --force --disable-interactivity
}
# Find COM Objects
Function Get-ComObject {
Get-ChildItem HKLM:\Software\Classes -ErrorAction SilentlyContinue | Where-Object {
$_.PSChildName -match '^\w+\.\w+$' -and (Test-Path -Path "$($_.PSPath)\CLSID")
} | Select-Object -ExpandProperty PSChildName
}
# Find all assemblies
Function Get-Assemblies {
[AppDomain]::CurrentDomain.GetAssemblies().getname() | select name | sort name
}