|
I tried looking at the UDF library but no one really explained how those scripts fit into my problem. I saw one It couldn't make heads or toes of it. Want to combine some of the simple Scipts into one script to do my task. Take the following script Returns IP Address in usable form. $IpPart1 = LTRIM(SUBSTR(@IPADDRESS0, 1, 4)) $IpPart2 = LTRIM(SUBSTR(@IPADDRESS0, 5, 4)) $IpPart3 = LTRIM(SUBSTR(@IPADDRESS0, 9, 4)) $IpPart4 = LTRIM(SUBSTR(@IPADDRESS0, 13, 3)) $IPAddressComplete = $IpPart1 + $IpPart2 + $IpPart3 + $IpPart4 and Just do as I stated above compare the last Octet and subnet Mask to come up with something like this $NEWGateway = $IPPart1 + $IPPart2 +$IPPart3 +$HSRPGAteway Take this IP Address and write it into the registry for the gateway or use the Netsh command to change the gateway on Win 2k Machines.
|