Try the following code:
var myDoc = app.activeDocument;
var myLayer = "Sample"; //Add your layer name here
var NewLayer = myDoc.layers.item(myLayer).duplicate();
myDoc.layers.item(myLayer).visible = false;
NewLayer.name = "SampleNew";
I think this will solve your problem.
Thks, works nicely.
Rather than turning off the layer visibility, you might want to use
myDoc.layers.item(myLayer).printable = false;
so it's visible in your document but does not print (as per request).