-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.ps1
73 lines (45 loc) · 1.42 KB
/
README.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
<# no-admin-powershell
Tips and tricks for when you don't have local admin rights
> First presented at [PowerShell Conference Europe 2022](https://psconf.eu)
#>
## Opening PowerShell
<#
When you are on Windows you do NOT need to install anything to get it started.
Just search for ISE in the Start menu to show find `Windows PowerShell ISE`.
ISE stands for Integrated Scripting Environment
ISE is perfectly enough!
#>
## Profile file
Write-Host $profile
Test-Path $profile
New-Item $profile -ItemType File
New-Item $profile -ItemType File -Force
## Execution Policy
Get-ExecutionPolicy
Set-ExecutionPolicy -ExecutionPolicy Bypass
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
## Error message color
<# As others have already said it, color red is bad, so use something nicer #>
$host.PrivateData.ErrorForegroundColor = 'Green'
## Save first instead of installing
Find-Module Pester
## Help system
Get-Help Get-Help
## Important commands
Get-Help
Get-Member
Get-Content
Test-Path
New-Item
Invoke-WebRequest
Foreach-Object
Where-Object
Select-Object
Sort-Object
$ProgressPreference = 'SilentlyContinue'
## Credit
<#
Influenced by **Mike F Robbins**
[http://mikefrobbins.com](http://mikefrobbins.com)
[PowerShell 101: The No-Nonsense Beginner’s Guide to PowerShell](https://github.com/mikefrobbins/Presentations/blob/main/PowerShell%20on%20the%20River%202019/PowerShell%20101/PowerShell%20101.ps1)
#>