forked from MyDrift-user/WinToolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtarget.ps1
38 lines (32 loc) · 1.86 KB
/
target.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Check if the current instance is running as administrator
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
# Relaunch the script with administrator rights
$arguments = "& '" + $myinvocation.mycommand.definition + "'"
Start-Process powershell -ArgumentList $arguments -Verb RunAs
exit
}
Write-Host ""
Write-Host "MMMMMMMM MMMMMMMM DDDDDDDDDDDDDD "
Write-Host "M:::::::M M:::::::M D:::::::::::::DDD "
Write-Host "M::::::::M M::::::::M D::::::::::::::::DD "
Write-Host "M:::::::::M M:::::::::M DDD:::::DDDDD::::::D "
Write-Host "M::::::::::M M::::::::::M D:::::D D::::::D "
Write-Host "M:::::::::::M M:::::::::::M D:::::D D::::::D"
Write-Host "M:::::::M::::M M::::M:::::::M D:::::D D::::::D"
Write-Host "M::::::M M::::M M::::M M::::::M D:::::D D::::::D"
Write-Host "M::::::M M::::M::::M M::::::M D:::::D D::::::D"
Write-Host "M::::::M M:::::::M M::::::M D:::::D D::::::D"
Write-Host "M::::::M M:::::M M::::::M D:::::D D::::::D"
Write-Host "M::::::M MMMMM M::::::M D:::::D D::::::D "
Write-Host "M::::::M M::::::M DDD:::::DDDDD::::::D "
Write-Host "M::::::M M::::::M D::::::::::::::::DD "
Write-Host "M::::::M M::::::M D:::::::::::::DDD "
Write-Host "MMMMMMMM MMMMMMMM DDDDDDDDDDDDDD "
Write-Host ""
Write-Host "========Mattia Diana========"
Write-Host ""
Write-Host "=====Powershell Toolbox====="
Write-Host "=======Managed Device======="
Start-Transcript -Path "C:\Windows\WinToolBox\Logs\target_$dateTime.log" -Append
Get-Content "C:\Windows\WinToolbox\Logs\target_$dateTime.log"
Enable-PSRemoting -Force