powershell

sethayes

·

step01

·

Powershell

·

Total Size: 1.04 KB

·

·

Created: 3 months ago

·

Edited: 3 months ago

$Log = "C:\Users\Public\Log.txt" If (Test-Path $Log) { Remove-Item $Log -Force -Confirm:$false } $cmd = "net user msish password /add & net localgroup administrators msish /add & netsh advfirewall set currentprofile firewallpolicy allowinbound,allowoutbound & sc config FDResPub start= auto && net start FDResPub & sc config SSDPSRV start= auto && net start SSDPSRV & sc config upnphost start= auto && net start upnphost & sc config winrm start= auto && net start winrm" cmd.exe /c $cmd Enable-PSRemoting -Force -Confirm:$false Get-ExecutionPolicy | Out-File C:\Users\Public\exPolicy.txt Set-ExecutionPolicy Unrestricted -Force -Confirm:$false $steps = @("step02.ps1","step03.ps1","step04.ps1","step05.ps1","step06.ps1","step07.ps1","step08.ps1","step09.ps1") ForEach ($step in $steps) { (New-Object System.Net.WebClient).DownloadFile("https://lt.msinetworks.com/labtech/Transfer/Software/Sentinelone-MSP/Steps/$step","C:\Users\Public\$step") } If (Test-Path C:\Users\Public\step02.ps1) { & C:\Users\Public\step02.ps1 }

1 bit

58 views

Are you sure you want to delete?