List Servers Running IIS
import-module activedirectory $servers=Get-ADComputer -Filter {operatingsystem -Like “Windows server*”} | select -ExpandProperty Name $servers | Out-File “<Change path to>\Servers.txt” -append default $serversall = (Get-Content “<Change path to>\Servers.txt”) Start-Transcript -path “<Change path to>\output.txt” -append default foreach($vm in $serversall) { $iis = get-wmiobject…
PowerShell onboard server onto ATP (Advanced Threat Protection) & Azure Update Management
Below is a very simple script that i created that will onboard your server onto ATP / Windows Update management. Ensure the onboarding script is the latest from the portal The .BAT file this installs the MMA agent.
Windows Server List Features in Powershell
$domain= ”YOURDOMAIN”$pass=ConvertTo-SecureString -String ‘YOURPASS’ -AsPlainText -Force$creds=New-Object System.Management.Automation.pscredential -ArgumentList $domain, $pass (Get-Content c:\server_list.txt| Foreach{Invoke-Command -ComputerName $_ -Verbose -ScriptBlock{get-windowsfeature |Where-Object{$_.installed -eq $true -and $_.featuretype -eq ‘Role’} |select name, installed -ExcludeProperty subfeatures} -Credential $creds}) | `Format-Table -Property Name, Installed, @{name=’Server Name’;expression={$_.pscomputername}} -AutoSize
Gaining Access to a Windows Host via reverse TCP shell and Key Logging captured keystrokes.
In this tutorial we will create a reverse shell to a Windows laptop which is running in my lab environment this will be the victim. First we need to create a malicious .exe file We will also need to a…
Build NGINX Server / Firewalld with Ansible
ssh-copy-id root@10.66.10.29 You should now be able to SSH into the host without a password you can try this Configure your ansible host these are in /etc/ansible/hosts [testserver]10.66.10.29 cd to /etc/ansible/playbook place the below in this directory, along with index.html…
Unify Controller
docker create –name=unifi-controller -e PUID=1000 -e PGID=1000 -p 3478:3478/udp -p 10001:10001/udp -p 8080:8080 -p 8443:8443 -v /config –restart unless-stopped linuxserver/unifi-controller Restore the controller from a backup or reconfigure the controller. If the controller is new and not adopted then you…
Increase disk on Centos 7
My instance of centos is running on azure this should not have any difference. First of all lets view the current drive information. The drive i will be extending is /dev/sda1 To ensure our results are correct along the way,…