Rootctl

Windows

List
PowerShell Networking Connection:







 

bypass the policy for one script only
--------------------------------------
powershell.exe -executionpolicy bypass -file '.\Hello World.ps1'

Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force;
Set-ExecutionPolicy RemoteSigned

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.3
N

For Windows Server 2008 this is how to change to use the SYSTEM user account when executing a scheduled task:

Go to Start > Administrative Tools > Task Scheduler
In the Task Scheduler window click "Create Task" on the right hand bar under the "Actions" pane
In the "Create Task" dialog click the "Change User or Group" button
Make sure "From this location" is set to the local machine name (to change click "Locations" button and select the local computer name)
Type "SYSTEM" in the text box and press ok . Under "When running the task, use the following user account:" you should see "NT AUTHORITY\SYSTEM".  

#################################################################################################################################################

Schedule & Log Performance Monitoring:
Right-click on the Data Collector Sets and select User Defined > New > Data Collector Set to set this up.
Give the data collector set a name
Next set it to a Create Data Logs, check the Performance counter box, and click Next.
On the next page, click the Add button.
Just as before with the live graph, add Memory to the list of active counters.
The same page where we clicked the Add button will show a list of the counters you just added. Now click the Next button to continue.
Then it’s time to choose where the logs will be saved. I suggest your Documents folder or somewhere easy to find.
Root Directory : %systemdrive%\Perflogs\Admin\Memory Log
Save and close, and then press Finish to exit.
The performance log is ready to run; all you need to do is start it. There are two different ways to go about starting this thing too.
The first is to right-click on it and manually start it.
Yeah, annoying. The second way is to right-click and open up the Properties window.



The file “C:\Program Files\Windows Defender\SymSrv.dll” is usually missing if the Windows Defender is not installed on the server.

Get-ExecutionPolicy -list

Set-executionpolicy ByPass -File .\InstallUI.ps1
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

Get-WmiObject win32_processor

Get-WmiObject win32_computerSystem


Get-ExecutionPolicy
Set-execution policy unrestricted

Write-Host "Hello, Guru99!"




get-NetFirewallRule | Out-GridView
Resolve-DnsName

get-command –noun *adserv*


###############

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Get-ExecutionPolicy – List
powershell -ExecutionPolicy Bypass -File script.ps1

Networking
 



.