-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathMicrosoft.PowerShell_profile.config.ps1
116 lines (100 loc) · 4.44 KB
/
Microsoft.PowerShell_profile.config.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<#
$Metadata = @{
Title = "Microsoft PowerShell profile configuration"
Filename = "Microsoft.PowerShell_profile.config.ps1"
Description = ""
Tags = "microsoft, powershell, configuration, installation"
Project = ""
Author = "Janik von Rotz"
AuthorContact = "www.janikvonrotz.ch"
CreateDate = "2013-04-11"
LastEditDate = "2013-10-17"
Version = "7.0.0"
License = @'
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/ or
send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
'@
}
#>
$global:WorkingPath = (Get-Location).Path
$global:PSProfile = New-Object PSObject -Property @{
Path = Split-Path $MyInvocation.MyCommand.Definition -Parent
GitSource = "https://github.com/janikvonrotz/PowerShell-PowerUp.git"
Install = Get-ChildItem -Path (Split-Path $MyInvocation.MyCommand.Definition -Parent) -Filter "Microsoft.PowerShell_profile.install.ps1" -Recurse
}
$global:PSbin = New-Object PSObject -Property @{
Path = Join-Path -Path $PSProfile.Path -ChildPath "bin"
}
$global:PSfunctions = New-Object PSObject -Property @{
Path = Join-Path -Path $PSProfile.Path -ChildPath "functions"
FormatData = New-Object PSObject -Property @{
Path = Join-Path -Path $PSProfile.Path -ChildPath "functions/FormatData"
Filter = "*.format.ps1xml"
}
}
$global:PSlib = New-Object PSObject -Property @{
Path = Join-Path -Path $PSProfile.Path -ChildPath "lib"
}
$global:PSlogs = New-Object PSObject -Property @{
Path = Join-Path -Path $PSProfile.Path -ChildPath "logs"
SessionFile = (Join-Path -Path (Join-Path -Path $PSProfile.Path -ChildPath "logs") -ChildPath ("PowerShell Session " + $((get-date -format o) -replace ":","-") + " " + $env:COMPUTERNAME + "-" + $env:USERNAME + ".txt"))
}
$global:PSconfigs = New-Object PSObject -Property @{
Path = Join-Path -Path $PSProfile.Path -ChildPath "configs"
File = New-Object PSObject -Property @{
Filter = "*.config.xml"
}
App = New-Object PSObject -Property @{
Filter = "*.app.config.xml"
DataFile = "PackageManager.config.xml"
}
Credential = New-Object PSObject -Property @{
Filter = "*.credential.config.xml"
}
EventLog = New-Object PSObject -Property @{
Filter = "*.eventlog.config.xml"
}
Mail = New-Object PSObject -Property @{
Filter = "*.mail.config.xml"
ErrorClass = "ErrorReport"
}
Profile = New-Object PSObject -Property @{
Filter = "*.profile.config.xml"
}
Script = New-Object PSObject -Property @{
Filter = "*.script.config.xml"
}
ScriptShortcut = New-Object PSObject -Property @{
DataFile = "ScriptShortcut.tmp.xml"
}
Server = New-Object PSObject -Property @{
Filter = "*.server.config.xml"
}
Task = New-Object PSObject -Property @{
Filter = "*.task.config.xml"
}
TrueCryptContainer = New-Object PSObject -Property @{
Filter = "*.truecryptcontainer.config.xml"
DataFile = "TrueCrypt.tmp.xml"
}
User = New-Object PSObject -Property @{
Filter = "*.user.config.xml"
}
}
$global:PSscripts = New-Object PSObject -Property @{
Path = Join-Path -Path $PSProfile.Path -ChildPath "scripts"
Extensions = ".ps1",".ps2",".ps3",".psm"
}
$global:PSapps = New-Object PSObject -Property @{
PowerShell = "%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe"
}
$global:PStemplates = New-Object PSObject -Property @{
Path = Join-Path -Path $PSProfile.Path -ChildPath "templates"
GitUpdate = Get-ChildItem -Path (Join-Path -Path $PSProfile.Path -ChildPath "templates") -Filter "Git-Update.task.config.xml" -Recurse
LogFileRetention = Get-ChildItem -Path (Join-Path -Path $PSProfile.Path -ChildPath "templates") -Filter "Delete-ObsoleteLogFiles.task.config.xml" -Recurse
RDP = Get-ChildItem -Path (Join-Path -Path $PSProfile.Path -ChildPath "templates") -Filter "Default.rdp" -Recurse
WinSCP = Get-ChildItem -Path (Join-Path -Path $PSProfile.Path -ChildPath "templates") -Filter "WinSCP.ini" -Recurse
CustomPPscript = Get-ChildItem -Path (Join-Path -Path $PSProfile.Path -ChildPath "templates") -Filter "Custom PowerShell Profile.script.config.ps1" -Recurse
CustomPPISEscript = Get-ChildItem -Path (Join-Path -Path $PSProfile.Path -ChildPath "templates") -Filter "Custom PowerShell Profile ISE.script.config.ps1" -Recurse
}