Jump to content

Recommended Posts

Posted
$ipchange = 'netsh interface ipv4 set address "Local Area Connection" static '
$one = 192.168.1.124
$two = 255.255.255.0
$three = 192.168.1.1

Run(@ComSpec & $ipchange & $one & $two & $three)

how would I go about using ip addresses in variables without using quotes?

Posted

Yes I understand, but why can't you just use:

$ipchange = 'netsh interface ipv4 set address "Local Area Connection" static '
$one = "192.168.1.124"
$two = "255.255.255.0"
$three = "192.168.1.1"
ConsoleWrite("Run('" & @ComSpec & " /c " & $ipchange & $one & " " & $two & " " & $three & "')" & @CRLF)

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...