blob: 6de9c4394def98da8bde5800e35e2bdd74ed02eb (
plain)
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
|
# Enable-Privilege
## SYNOPSIS
Enables a specific privilege for the current process.
Author: Will Schroeder (@harmj0y)
License: BSD 3-Clause
Required Dependencies: PSReflect
## SYNTAX
```
Enable-Privilege [-Privilege] <String[]>
```
## DESCRIPTION
Uses RtlAdjustPrivilege to enable a specific privilege for the current process.
Privileges can be passed by string, or the output from Get-ProcessTokenPrivilege
can be passed on the pipeline.
## EXAMPLES
### -------------------------- EXAMPLE 1 --------------------------
```
Get-ProcessTokenPrivilege
```
Privilege Attributes ProcessId
--------- ---------- ---------
SeShutdownPrivilege DISABLED 3620
SeChangeNotifyPrivilege ...AULT, SE_PRIVILEGE_ENABLED 3620
SeUndockPrivilege DISABLED 3620
SeIncreaseWorkingSetPrivilege DISABLED 3620
SeTimeZonePrivilege DISABLED 3620
Enable-Privilege SeShutdownPrivilege
Get-ProcessTokenPrivilege
Privilege Attributes ProcessId
--------- ---------- ---------
SeShutdownPrivilege SE_PRIVILEGE_ENABLED 3620
SeChangeNotifyPrivilege ...AULT, SE_PRIVILEGE_ENABLED 3620
SeUndockPrivilege DISABLED 3620
SeIncreaseWorkingSetPrivilege DISABLED 3620
SeTimeZonePrivilege DISABLED 3620
### -------------------------- EXAMPLE 2 --------------------------
```
Get-ProcessTokenPrivilege
```
Privilege Attributes ProcessId
--------- ---------- ---------
SeShutdownPrivilege DISABLED 2828
SeChangeNotifyPrivilege ...AULT, SE_PRIVILEGE_ENABLED 2828
SeUndockPrivilege DISABLED 2828
SeIncreaseWorkingSetPrivilege DISABLED 2828
SeTimeZonePrivilege DISABLED 2828
Get-ProcessTokenPrivilege | Enable-Privilege -Verbose
VERBOSE: Attempting to enable SeShutdownPrivilege
VERBOSE: Attempting to enable SeChangeNotifyPrivilege
VERBOSE: Attempting to enable SeUndockPrivilege
VERBOSE: Attempting to enable SeIncreaseWorkingSetPrivilege
VERBOSE: Attempting to enable SeTimeZonePrivilege
Get-ProcessTokenPrivilege
Privilege Attributes ProcessId
--------- ---------- ---------
SeShutdownPrivilege SE_PRIVILEGE_ENABLED 2828
SeChangeNotifyPrivilege ...AULT, SE_PRIVILEGE_ENABLED 2828
SeUndockPrivilege SE_PRIVILEGE_ENABLED 2828
SeIncreaseWorkingSetPrivilege SE_PRIVILEGE_ENABLED 2828
SeTimeZonePrivilege SE_PRIVILEGE_ENABLED 2828
## PARAMETERS
### -Privilege
{{Fill Privilege Description}}
```yaml
Type: String[]
Parameter Sets: (All)
Aliases: Privileges
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```
## INPUTS
## OUTPUTS
## NOTES
## RELATED LINKS
[http://forum.sysinternals.com/tip-easy-way-to-enable-privileges_topic15745.html](http://forum.sysinternals.com/tip-easy-way-to-enable-privileges_topic15745.html)
|