http://technet.microsoft.com/en-us/library/ee692804.aspx

http://ss64.com/ps/syntax-methods.html

Basically says grab the x character to the y character.

$mysubnet=SubStr($myaddress,5,3) would give you the 5th character to the (5+3) 
8th character.

Daniel Ratliff

From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On 
Behalf Of Marcum, John
Sent: Monday, November 25, 2013 10:44 AM
To: Scripting List (scripting@lists.myITforum.com)
Subject: [scripting] Simple KIX Question

Can someone explain to me what this is doing? Specifically how does  
"$mysubnet=SubStr($myaddress,5,3)" become "$mysubnet="200""? I assume it's 
doing some math there or something????


   $myaddress=@ipaddress0
   $mysubnet=SubStr($myaddress,5,3)
;
   Select
;
; Local Office
                Case      $mysubnet="200"
                                $officelocation="BHM"
                                SetTime "\\SERVER02<file:///\\SERVER02>"
                Case      $mysubnet="108"
                                $officelocation="BHM"
                                SetTime "\\SERVER02<file:///\\SERVER02>"

________________________________
John Marcum
Sr. Desktop Architect
Bradley Arant Boult Cummings LLP
________________________________


________________________________

Confidentiality Notice: This e-mail is from a law firm and may be protected by 
the attorney-client or work product privileges. If you have received this 
message in error, please notify the sender by replying to this e-mail and then 
delete it from your computer.


The information transmitted is intended only for the person or entity to which 
it is addressed
and may contain CONFIDENTIAL material.  If you receive this 
material/information in error,
please contact the sender and delete or destroy the material/information.


Reply via email to