start /w msiexec /x {PRO-DU-C-T-CODE} /l*v C:\debug.log /qn REBOOT=R
Category: Misc
Run strace with the more verbose output
strace -ttvvfFs4096 -o file_to_write_log command /-ppid
Upload file to FTP using cURL
curl -vv -T --user username:password ftp://example.com/
List all scheduled tasks using PowerShell
Get-ScheduledTask -TaskPath "\" | % { $Task = "" | Select Task, Description, Enabled, Application, Arguments; $TaskInfo = [xml](Export-ScheduledTask $_); $Task.Task = $_.TaskName; $Task.Description = $_.Description; $Task.Enabled = $TaskInfo.Task.Settings.Enabled; $Task.Application = $TaskInfo.Task.Actions.Exec.Command; $Task.Arguments = $TaskInfo.Task.Actions.Exec.Arguments; $Task } | FL
Init Plesk without any information about administrator
plesk bin init_conf --init -hostname-not-required -license_agreed true -admin_info_not_required true -email 'user@example.com'
Run command remotely over Windows RPC
$credentials = Get-Credential $server = "192.0.0.1" Invoke-WmiMethod -Path Win32_Process -ComputerName $server -name Create -Credential $credentials -ArgumentList "cmd /c remote_command.exe"
List packages, maintained by Plesk
- On
.deb
-based OS:dpkg-query -f='${Package} ${Maintainer}\n' -W | grep Plesk | cut -d' ' -f1
- On
.rpm
-based OS:yum list installed | grep -i '@plesk' | cut -d' ' -f1 | sed '/^$/d'
Run Plesk API request from CLI
curl -kLi -H "Content-Type: text/xml" -H "HTTP_AUTH_LOGIN: admin" -H "HTTP_AUTH_PASSWD:verysecurepwd" -H "HTTP_PRETTY_PRINT: TRUE" -d @payload.xml https://plesk.example.com:8443/enterprise/control/agent.php
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} $request = New-Object System.Net.WebClient $request.Headers.add('HTTP_AUTH_LOGIN','admin') $request.Headers.add('HTTP_AUTH_PASSWD','verysecurepwd') $request.Headers.add('HTTP_PRETTY_PRINT','true') $response = $request.UploadFile('https://plesk.example.com:8443/enterprise/control/agent.php','.\payload.xml') [System.Text.Encoding]::ASCII.GetString($response)
Add your IP to the allowed in “Restrict administrative access” list
plesk db "INSERT INTO cp_access (type, netaddr, netmask) VALUES ('deny','10.10.10.1','255.255.252.0');"
Load updates from the developer repositories
echo "10.52.3.135 autoinstall.plesk.com" >> /etc/hosts