svcadm disable smb/serversvcadm disable samba/opt/csw/bin/pkgutil -U/opt/csw/bin/pkgutil -a | grep samba/opt/csw/bin/pkgutil -i samba/opt/csw/bin/smbd -b/etc/opt/csw/samba/smb.conf/opt/csw/bin/smbpasswd -a hogea=(cswnmbd default cswwinbindd cswsmbd);for i in ${a[@]}; do svcadm restart cswsamba:$i; done
Set args = WScript.ArgumentsIf args.Count < 3 then Wscript.Echo "usage : %0 (pause|resume) Server Printer" WScript.Quit 255end IfstrCmd = args.item(0)strServer = args.item(1)strPrinter = args.item(2)Set objWMIService =GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strServer & "\root\cimv2")Set colPrinters = objWMIService.ExecQuery("Select * from Win32_Printer Where Name='" & strPrinter & "'")If colprinters.Count > 0 Then For Each objPrinter in colPrinters If strCmd = "pause" then ObjPrinter.Pause() If strCmd = "resume" then ObjPrinter.Resume() NextElse Wscript.Echo strPrinter & " was not found on server " & strServerEnd If