0% found this document useful (0 votes)
0 views

Window Hard

Uploaded by

Manoj Dahiya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Window Hard

Uploaded by

Manoj Dahiya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

12/1/24, 11:19 AM ChatGPT

ChatGPT 4o mini Log in

}
Copy code

Invoke-Command -ScriptBlock $ScriptBlock

# 14. Enable File Extension Viewing


Write-Host "Enabling file extension viewing..."
$Shell = New-Object -ComObject Shell.Application
$Folder = $Shell.Namespace('C:\')
$FolderItems = $Folder.Items()
$FolderItems.InvokeVerb('View')

Write-Host "Windows Hardening Script Completed!"

Key Changes and Explanations:

1. IP Whitelisting for Services (FTP, SSH, SMB, RDP)

powershell Copy code

$allowedIPs = @('192.168.1.100', '192.168.1.101') # Specify IP addresses that c

# Configure IP whitelisting for specific services (RDP, SSH, etc.)


foreach ($ip in $allowedIPs) {
Write-Host "Allowing access from IP: $ip"
New-NetFirewallRule -DisplayName "Allow IP $ip for RDP" -Direction Inbound
New-NetFirewallRule -DisplayName "Allow IP $ip for SSH" -Direction Inbound
}

Get smarter responses, upload files and images, and more.


This section ensures that only specified IP addresses are allowed to access services
like RDP
Log in (Port
Sign up 3389) and SSH (Port 22).

New-NetFirewallRule is used to create a firewall rule that allows inbound traffic

Message ChatGPT

ChatGPT can make mistakes. Check important info. ?

https://chatgpt.com 1/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 2/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 3/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 4/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 5/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 6/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 7/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 8/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 9/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 10/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 11/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 12/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 13/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 14/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 15/16
12/1/24, 11:19 AM ChatGPT

https://chatgpt.com 16/16

You might also like