changed password to securestring and some of the verbs
This commit is contained in:
34
samy.ps1
34
samy.ps1
@@ -194,7 +194,7 @@ $ConfirmPreference = 'None'
|
|||||||
|
|
||||||
[Parameter(Mandatory,ParameterSetName='DattoFetch')]
|
[Parameter(Mandatory,ParameterSetName='DattoFetch')]
|
||||||
[Parameter(Mandatory,ParameterSetName='DattoInstall')]
|
[Parameter(Mandatory,ParameterSetName='DattoInstall')]
|
||||||
[string]$WebhookPassword,
|
[SecureString]$WebhookPassword,
|
||||||
|
|
||||||
[string]$WebhookUrl = $Global:DattoWebhookUrl,
|
[string]$WebhookUrl = $Global:DattoWebhookUrl,
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ $ConfirmPreference = 'None'
|
|||||||
[Parameter(Mandatory = $false)][string] $NewRepositoryURL = "http://proget.svstools.ca:8083/nuget/SVS_Repo/"
|
[Parameter(Mandatory = $false)][string] $NewRepositoryURL = "http://proget.svstools.ca:8083/nuget/SVS_Repo/"
|
||||||
)
|
)
|
||||||
|
|
||||||
function Perform-Cleanup {
|
function Start-Cleanup {
|
||||||
Write-LogHybrid "Cleanup mode enabled. Starting cleanup..." "Info" "SVSModule"
|
Write-LogHybrid "Cleanup mode enabled. Starting cleanup..." "Info" "SVSModule"
|
||||||
|
|
||||||
# Attempt to uninstall all versions of SVSMSP
|
# Attempt to uninstall all versions of SVSMSP
|
||||||
@@ -435,9 +435,9 @@ $ConfirmPreference = 'None'
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function Perform-ToolkitInstallation {
|
function Start-ToolkitInstallation {
|
||||||
Initialize-NuGetProvider
|
Initialize-NuGetProvider
|
||||||
Perform-Cleanup
|
Start-Cleanup
|
||||||
|
|
||||||
Write-LogHybrid "Registering repo $NewRepositoryName…" "Info" "SVSModule" -LogToEvent
|
Write-LogHybrid "Registering repo $NewRepositoryName…" "Info" "SVSModule" -LogToEvent
|
||||||
if (-not (Get-PSRepository -Name $NewRepositoryName -ErrorAction SilentlyContinue)) {
|
if (-not (Get-PSRepository -Name $NewRepositoryName -ErrorAction SilentlyContinue)) {
|
||||||
@@ -457,16 +457,16 @@ $ConfirmPreference = 'None'
|
|||||||
Write-LogHybrid "Install-SVSMSP called" "Info" "SVSModule" -LogToEvent
|
Write-LogHybrid "Install-SVSMSP called" "Info" "SVSModule" -LogToEvent
|
||||||
if ($Cleanup) {
|
if ($Cleanup) {
|
||||||
|
|
||||||
Perform-Cleanup
|
Start-Cleanup
|
||||||
Remove-SVSDeploymentRegKey
|
Remove-SVSDeploymentRegKey
|
||||||
return
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($InstallToolkit) {
|
if ($InstallToolkit) {
|
||||||
Perform-ToolkitInstallation; return
|
Start-ToolkitInstallation; return
|
||||||
}
|
}
|
||||||
# default if no switch passed:
|
# default if no switch passed:
|
||||||
Perform-ToolkitInstallation
|
Start-ToolkitInstallation
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion SVS Module
|
#endregion SVS Module
|
||||||
@@ -809,8 +809,8 @@ Write-LogHybrid "Tasks by page: onboard=$(
|
|||||||
|
|
||||||
#endregion building the Menus
|
#endregion building the Menus
|
||||||
|
|
||||||
#region Build-Checkboxes
|
#region Publish-Checkboxes
|
||||||
function Build-Checkboxes {
|
function Publish-Checkboxes {
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory)][string]$Page,
|
[Parameter(Mandatory)][string]$Page,
|
||||||
[string]$Column
|
[string]$Column
|
||||||
@@ -854,10 +854,10 @@ Write-LogHybrid "Tasks by page: onboard=$(
|
|||||||
$html
|
$html
|
||||||
}
|
}
|
||||||
) -join "`n"
|
) -join "`n"
|
||||||
} # end function Build-checkboxes
|
} # end function Publish-Checkboxes
|
||||||
|
|
||||||
|
|
||||||
#endregion Build-Checkboxes
|
#endregion Publish-Checkboxes
|
||||||
|
|
||||||
#region Get-ModuleVersionHtml
|
#region Get-ModuleVersionHtml
|
||||||
|
|
||||||
@@ -966,11 +966,11 @@ function Get-UIHtml {
|
|||||||
#
|
#
|
||||||
# 1) Build checkbox HTML per page/column
|
# 1) Build checkbox HTML per page/column
|
||||||
#
|
#
|
||||||
$onboardLeft = Build-Checkboxes -Page 'onboard' -Column 'left'
|
$onboardLeft = Publish-Checkboxes -Page 'onboard' -Column 'left'
|
||||||
$onboardRight = Build-Checkboxes -Page 'onboard' -Column 'right'
|
$onboardRight = Publish-Checkboxes -Page 'onboard' -Column 'right'
|
||||||
$offboard = Build-Checkboxes -Page 'offboard' -Column ''
|
$offboard = Publish-Checkboxes -Page 'offboard' -Column ''
|
||||||
$tweaks = Build-Checkboxes -Page 'tweaks' -Column ''
|
$tweaks = Publish-Checkboxes -Page 'tweaks' -Column ''
|
||||||
$apps = Build-Checkboxes -Page 'SVSApps' -Column ''
|
$apps = Publish-Checkboxes -Page 'SVSApps' -Column ''
|
||||||
|
|
||||||
#
|
#
|
||||||
# 2) Build the JS tasks array once (this is the only dynamic JS piece)
|
# 2) Build the JS tasks array once (this is the only dynamic JS piece)
|
||||||
@@ -1505,7 +1505,7 @@ function Install-DattoRMM {
|
|||||||
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')]
|
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')]
|
||||||
param (
|
param (
|
||||||
[switch]$UseWebhook,
|
[switch]$UseWebhook,
|
||||||
[string]$WebhookPassword,
|
[SecureString]$WebhookPassword,
|
||||||
[string]$WebhookUrl = $Global:DattoWebhookUrl,
|
[string]$WebhookUrl = $Global:DattoWebhookUrl,
|
||||||
[string]$ApiUrl,
|
[string]$ApiUrl,
|
||||||
[string]$ApiKey,
|
[string]$ApiKey,
|
||||||
|
|||||||
Reference in New Issue
Block a user