Bu yazıda sıklıkla kullanılan bazı Powershell komutlarına ulaşabilirsiniz.
IP Konfigürasyonunu Görmek
Get-NetIPConfiguration
Tüm Network Adaptörlerini Görmek
Get-NetAdapter
Network Adaptörünü İsimlendirmek
Get-NetAdapter -Name *Ethernet*
Detaylı Network Konfigürasyonlarını Görmek
Get-NetAdapter | ft Name, Status, Linkspeed, VlanID
Driver Bilgilerini Görmek
Get-NetAdapter | ft Name, DriverName, DriverVersion, DriverInformation, DriverFileName
Network Adaptörünün Donanım Bilgilerini Görmek
Get-NetAdapterHardwareInfo
Network Adaptörünü Etkinleştirmek Ve Devre Dışı Bırakmak
Disable-NetAdapter -Name “Wireless Network Connection”
Enable-NetAdapter -Name “Wireless Network Connection”
Network Adaptörünün Adını Yenilemek
Rename-NetAdapter -Name “Wireless Network Connection” -NewName “Wireless”
POWERSHELL İLE IP KONFİGÜRASYONU YAPMAK
IP ve DNS Bilgilerini Görüntülemek
Get-NetAdapter -Name “Local Area Connection” | Get-NetIPAddress
Sadece IP Adresini Görüntülemek
(Get-NetAdapter -Name “Local Area Connection” | Get-NetIPAddress).IPv4Address
DNS Bilgilerini Görüntülemek
Get-NetAdapter -Name “Local Area Connection” | Get-DnsClientServerAddress
IP ADRES Ataması Yapmak
New-NetIPAddress -InterfaceAlias “Wireless” -IPv4Address 192.168.1.95 -PrefixLength “24” -DefaultGateway 192.168.1.1
Varolan IP Adresini Değiştirmek
Set-NetIPAddress -InterfaceAlias “Wireless” -IPv4Address 192.168.12.25 -PrefixLength “24”
IP Adresini Kaldırmak
Get-NetAdapter -Name “Wireless” | Remove-NetIPAddress
DNS Server Girmek
Set-DnsClientServerAddress -InterfaceAlias “Wireless” -ServerAddresses “10.10.20.1”,”10.10.20.2″
Bir İnterface (Arayüz)’de DHCP’yi Etkinleştirmek
Set-NetIPInterface -InterfaceAlias “Wireless” -Dhcp Enabled
POWERSHELL İLE PING KOMUTLARI
Ping Atmak
Test-NetConnection -ComputerName www.ahmetmutlu.blogspot.com
Birden Fazla IP’ye Ping Atmak
1..99 | % { Test-NetConnection -ComputerName x.x.x.$_ } | FT -AutoSize
Trace Atmak
Test-NetConnection www.ahmetmutlu.blogspot.com –TraceRoute
Açık Portları Görmek
Test-NetConnection -ComputerName www.ahmetmutlu.blogspot.com -Port 80
Test-NetConnection -ComputerName www.ahmetmutlu.blogspot.com -CommonTCPPort http
NSLOOKUP
Resolve-DnsName www.ahmetmutlu.blogspot.com
Resolve-DnsName www.ahmetmutlu.blogspot.com -Type MX -Server 8.8.8.8
ROUTE
Get-NetRoute -Protocol Local -DestinationPrefix 192.168*
Get-NetRoute -InterfaceAlias Wi-Fi
New-NetRoute –DestinationPrefix “10.0.0.0/24” –InterfaceAlias “Ethernet” –NextHop 192.168.1.1
NETSTAT
Get-NetTCPConnection
Get-NetTCPConnection –State Established
NIC TEAMING
New-NetLbfoTeam -Name NICTEAM01 -TeamMembers Ethernet, Ethernet2 -TeamingMode SwitchIndependent -TeamNicName NICTEAM01 -LoadBalancingAlgorithm Dynamic
SMB KOMUTLARI
SMB Client bilgileri
Get-SmbClientConfiguration
SMB CONNECTION
Get-SmbConnection
SMB Mutlichannel Connection
Get-SmbMutlichannelConnection
SMB Açık dosyaları görmek
Get-SmbOpenFile
SMB Direct (RDMA) adaptörlerini görmek
Get-NetAdapterRdma
HYPER-V NETWORK KOMUTLARI
Get And Set Network Adapter VMQ Settings
Get-NetAdapterVmq
# Disable VMQ
Set-NetAdapterVmq -Enabled $false
# Enable VMQ
Set-NetAdapterVmq -Enabled $true
VM Network Adapter
Get-VMNetworkAdapter -VMName Server01
VM Network Adapter IP Adresini Görmek
(Get-VMNetworkAdapter -VMName NanoConHost01).IPAddresses
VM Network Adapter Mac Addresses Görmek
(Get-VMNetworkAdapter -VMName NanoConHost01).MacAddress
Bu konuyla ilgili sorularınızı alt kısımda bulunan yorumlar alanını kullanarak sorabilirsiniz.
Referanslar