We do allow other workstations on the domain, mainly employees that do work from home on occasion, but not often enough to issue a laptop. We also have venders that do work regularly within the office, they are normally renamed and joined to the domain. In the past everyone had the same style logon script regardless of ‘owner’, there was some minor name checking but many of the non-company machines were still getting the script.
Machine types that are allowed:
Sxxx(Y)xx
(W/L)xxxxxx
Possible Ys: S, N, K, E, H, M, R, L
All ‘x’: Numbers
What I have so far (still working things out):
Code:
$sType=SubStr(@WKSTA,1,1)
Select
Case $sType = "S"
$sLocation=SubStr(@WKSTA,2,4)
$sFunction=SubStr(@WKSTA,6,1)
$sNode=SubStr(@WKSTA,7,2)
Select
Case $sLocation >= "0002" AND $sLocation <= "0999"
Select
Case $sFunction >= "A" AND $sFunction <= "z"
Select
Case $sNode >= "01" AND $sNode <= "99"
$computername = "Store" ; One of the above
EndSelect
EndSelect
EndSelect
Case $sType = "W" OR $sType = "L"
$sAsset=SubStr(@WKSTA,2,6)
Select
Case $sAsset=Val($sAsset)
If $sAsset >= "000001" AND $sAsset <= "999999"
$computername = "Corp"
EndIf
EndSelect
EndSelect
Return
Exit
I’m just trying to clean this up a little more being specific of the node names. I still am testing so the ‘A – Z’ is about to be changed next, I was just using that for testing to ensure I was in the ‘right’ path.
_________________________
penny = the target
the playing field = three football fields side by side
you = only allowed to stand on the outside of the playing field
tool you get to use to find the penny = a ONE INCH LAWN DART
get the level of difficulty?