Commit 18d2227b authored by Gabriel Moreau's avatar Gabriel Moreau
Browse files

Better doc and add config file

parent b570b6a1
......@@ -3,14 +3,14 @@
Create a file `Custom-VarOverload.psm1` in your current folder
```
# Kaspersky Endpoint Security
$Global:SWMB_Custom{'KesLogin'} = "KLAdmin"
$Global:SWMB_Custom.KesLogin = "KLAdmin"
# If clear password
$Global:SWMB_Custom{'KesPassword'} = ""
$Global:SWMB_Custom.KesPassword = ""
# Or if encrypted blurred password
$Global:SWMB_Custom{'KesSecureString'} = ""
$Global:SWMB_Custom{'KesKeyFile'} = ""
$Global:SWMB_Custom.KesSecureString = ""
$Global:SWMB_Custom.KesKeyFile = ""
```
You can choose to put the password to modify Kasperky in clear text
......
......@@ -8,7 +8,29 @@ $Key | Out-File $KeyFile
$EncryptedPass = ConvertFrom-SecureString -SecureString $Password -Key $Key
Write-Output ""
Write-Output "# Lines to add in your configuration file Custom-VarOverload.psm1"
Write-Output ""
Write-Output "`$Global:SWMB_Custom.KesSecureString = '$EncryptedPass'"
Write-Output "`$Global:SWMB_Custom.KesKeyFile = '$KeyFile'"
Write-Output ""
If (!(Test-Path -LiteralPath ".\Custom-VarOverload.psm1")) {
$Query = Read-Host -Prompt "Do you want to create a configration file in the current folder [Y|n]"
If ($Query.ToLower() -ne "n") {
Write-Output "
# Configuration for Kaspersky Endpoint
`$Global:SWMB_Custom.KesSecureString = '$EncryptedPass'
`$Global:SWMB_Custom.KesKeyFile = '$KeyFile'
" | Out-File -Path ".\Custom-VarOverload.psm1"
}
} Else {
$Query = Read-Host -Prompt "Do you want to append theses parameters in your current configuration file [Y|n]"
If ($Query.ToLower() -ne "n") {
Write-Output "
# Configuration for Kaspersky Endpoint
`$Global:SWMB_Custom.KesSecureString = '$EncryptedPass'
`$Global:SWMB_Custom.KesKeyFile = '$KeyFile'
" | Out-File -Path ".\Custom-VarOverload.psm1" -Append
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment