Clear-DellAdminPassword.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
Function Clear-DellAdminPassword {
<#
  .Synopsis
    Erases the Admin (Setup) BIOS password
  .Description
    This CmdLet clears the Admin password in BIOS. Provide the existing password using -Password parameter.
  .Example
    Clear-DellAdminPassword -Password <existing password>
#>

param(  
    [Parameter(Mandatory=$true)][string] $Password
      
 )

 BEGIN { 
        
 }
 PROCESS {
     Set-Item DellSmbios:\Security\AdminPassword -value "" -password $Password -ErrorVariable ev
     if ($ev){
              Write-Warning "$ev Error occured in $($ev.InvocationInfo.ScriptName)"            
    }    
 }
 END{}

  }

# SIG # Begin signature block
# MIIZCAYJKoZIhvcNAQcCoIIY+TCCGPUCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQU0dInTz2iNUi1L+nJUCJqRJHc
# 3KugghQAMIID7jCCA1egAwIBAgIQfpPr+3zGTlnqS5p31Ab8OzANBgkqhkiG9w0B
# AQUFADCBizELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTEUMBIG
# A1UEBxMLRHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEdMBsGA1UECxMUVGhh
# d3RlIENlcnRp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