¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 256°Ç
   
PowerShell IP ¼ÂÆÃ
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2011-06-03 (±Ý) 17:20 Á¶È¸ : 5862
±ÛÁÖ¼Ò :
                                
STATIC ¾ÆÀÌÇÇ ¼³Á¤
 
$NICs = Get-WMIObject Win32_NetworkAdapterConfiguration | where{$_.IPEnabled -eq ¡°TRUE¡±}
 
Foreach($NIC in $NICs) {
 
    $IP =$NIC.IPAddress -match "\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b"
    $Subnet = "255.255.255.0"
    $DNSServers = "168.126.63.1", "168.126.63.2"
    $Domain = $NIC.DNSDomain
 
    $NIC.EnableStatic("$IP", $Subnet)
    $NIC.SetGateways("115.XX.XX.10")
    $NIC.SetDNSServerSearchOrder($DNSServers)
    $NIC.SetDynamicDNSRegistration(¡°TRUE¡±)
    $NIC.SetDNSDomain($Domain)
}

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.