sync: auto-sync from HOWARD-HOME at 2026-07-15 12:26:02
Author: Howard Enos Machine: HOWARD-HOME Timestamp: 2026-07-15 12:26:02
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Import-Module ActiveDirectory
|
||||
$pw = ConvertTo-SecureString 'Lcyaz0KF5L8IoRh7Pf4K.7QQwJq' -AsPlainText -Force
|
||||
New-ADUser -Name 'svc-msp360' -SamAccountName 'svc-msp360' -UserPrincipalName 'svc-msp360@acg.local' -DisplayName 'MSP360 Backup Service' -Description 'Service account for MSP360/Online Backup Exchange backup on NEPTUNE. Created 2026-07-15 by Howard via ClaudeTools.' -AccountPassword $pw -Enabled $true -PasswordNeverExpires $true -CannotChangePassword $true
|
||||
Add-ADGroupMember -Identity 'Organization Management' -Members 'svc-msp360'
|
||||
Start-Sleep -Seconds 2
|
||||
$u = Get-ADUser 'svc-msp360' -Properties PasswordNeverExpires, MemberOf
|
||||
Write-Output ('created: ' + $u.SamAccountName + ' enabled=' + $u.Enabled + ' pwdNeverExpires=' + $u.PasswordNeverExpires)
|
||||
$u.MemberOf | ForEach-Object { Write-Output ('member: ' + $_) }
|
||||
5
.neptune-runplan.ps1
Normal file
5
.neptune-runplan.ps1
Normal file
@@ -0,0 +1,5 @@
|
||||
$ErrorActionPreference = 'Continue'
|
||||
$cbb = 'C:\Program Files\Arizona Computer Guru\Online Backup\cbb.exe'
|
||||
$out = & $cbb plan -r '804b1884-356a-453b-ab6b-1b25398f0773' 2>&1
|
||||
Write-Output "exit: $LASTEXITCODE"
|
||||
$out | ForEach-Object { "$_" }
|
||||
7
.neptune-status.ps1
Normal file
7
.neptune-status.ps1
Normal file
@@ -0,0 +1,7 @@
|
||||
$ErrorActionPreference = 'Continue'
|
||||
$cbb = 'C:\Program Files\Arizona Computer Guru\Online Backup\cbb.exe'
|
||||
$out = & $cbb status 2>&1
|
||||
$out | ForEach-Object { "$_" }
|
||||
Write-Output '=== last history for plan ==='
|
||||
$h = & $cbb plan -lh -id '804b1884-356a-453b-ab6b-1b25398f0773' 2>&1
|
||||
$h | Select-Object -First 30 | ForEach-Object { "$_" }
|
||||
@@ -1,22 +0,0 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Add-LocalGroupMember -Group 'Administrators' -Member 'ACG\svc-msp360' -ErrorAction SilentlyContinue
|
||||
Write-Output ('local admin: ' + [bool](Get-LocalGroupMember -Group 'Administrators' -Member 'ACG\svc-msp360' -ErrorAction SilentlyContinue))
|
||||
$sid = (New-Object System.Security.Principal.NTAccount('ACG','svc-msp360')).Translate([System.Security.Principal.SecurityIdentifier]).Value
|
||||
$tmp = 'C:\Windows\Temp\se.inf'
|
||||
secedit /export /cfg $tmp /areas USER_RIGHTS | Out-Null
|
||||
$c = Get-Content $tmp
|
||||
$line = $c | Where-Object { $_ -match '^SeServiceLogonRight' }
|
||||
if ($line -notmatch [regex]::Escape($sid)) {
|
||||
$new = $c -replace '^(SeServiceLogonRight *=.*)$', ('$1,*' + $sid)
|
||||
if (-not $line) { $new += 'SeServiceLogonRight = *' + $sid }
|
||||
$new | Set-Content $tmp -Encoding Unicode
|
||||
secedit /configure /db C:\Windows\Temp\se.sdb /cfg $tmp /areas USER_RIGHTS | Out-Null
|
||||
Write-Output 'SeServiceLogonRight granted'
|
||||
} else { Write-Output 'SeServiceLogonRight already present' }
|
||||
Remove-Item $tmp, C:\Windows\Temp\se.sdb -ErrorAction SilentlyContinue
|
||||
$svc = Get-WmiObject Win32_Service -Filter "Name='Online Backup Service'"
|
||||
$r = $svc.Change($null,$null,$null,$null,$null,$null,'ACG\svc-msp360','Lcyaz0KF5L8IoRh7Pf4K.7QQwJq')
|
||||
Write-Output ('service change rc=' + $r.ReturnValue)
|
||||
Restart-Service 'Online Backup Service' -Force
|
||||
Start-Sleep -Seconds 5
|
||||
Get-WmiObject Win32_Service -Filter "Name='Online Backup Service'" | Select-Object Name, StartName, State | Format-Table -AutoSize
|
||||
Reference in New Issue
Block a user