We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a970450 commit 1c2391eCopy full SHA for 1c2391e
Modules/Remove-XboxCredentials.psm1
@@ -1,4 +1,5 @@
1
-@{
+# TODO: Clean up the code no need for two for-loops.
2
+@{
3
ModuleName = 'Remove-XboxCredentials'
4
ModuleVersion = '1.0.0'
5
Author = 'Tyler Jaacks'
@@ -22,6 +23,19 @@ function Remove-XboxCredentials {
22
23
24
Write-Output "Removed: $credName"
25
}
26
+
27
+ $CredsToRemove = $Creds -Match "MCLMS\|.*"
28
29
+ # Remove each matching credential
30
+ foreach ($Cred in $CredsToRemove) {
31
+ # Extract the exact credential name
32
+ $CredName = $Cred -Replace ".*Target: ", ""
33
34
+ # Remove the credential
35
+ cmdkey /delete:$CredName
36
37
+ Write-Output "Removed: $credName"
38
+ }
39
40
41
# Export the function to be available to users of the module
0 commit comments