Skip to main content

Search

Search

Deleting Old Print Spool Jobs Using A Powershell Script Bartender

Comments

5 comments

  • Avatar
    Domingo Rodriguez
    Moderator

    What exact syntax are you using for the powershell script?

     

    Attach your Commander task list (.tl) please.

     

    Do you get any error message when the service won't start? Does it give any useful information as to why the service cannot start, such as an error number?

    0
  • Avatar
    Legacy Poster

    Stop-Service “Commander Service”
    Stop-Service Spooler
    $Spoolers = Get-ChildItem C:\windows\system32\spool\Printers\* -recurse
    foreach($Spooler in $Spoolers)
    {
    if(((get-date) - $Spooler.lastwritetime) -gt "2")
    {
    Remove-Item -Path C:\Windows\System32\spool\PRINTERS\$($Spooler.Name) -Recurse -confirm:$false
    }
    }

    Start-Service Spooler
    Start-Service “Commander Service”

     

    Above is the script which I run.

     

    I checked the eventlogs , it was showing below message.

     

    The Commander Service service was unable to log on as .\bartender with the currently configured password due to the following error:
    Logon failure: the user has not been granted the requested logon type at this computer.
     
    Service: Commander Service
    Domain and account: .\bartender
     

    I see , Log on as service has been granted on bartender account (Local Account).

     

    Thanks,

     

    -Prashant Girennavar.

    0
  • Avatar
    Domingo Rodriguez
    Moderator

    Can you try configuring the "Commander Service" under Windows Services under a different account? Perhaps a domain account with sufficient credentials?

    0
  • Avatar
    Legacy Poster

    Lets give a try on that.

     

    Also we see the application is getting crashing once we stop and start the commander service

     

    Faulting application name: BarTend.exe, version: 9.40.2760.2652, time stamp: 0x4d7980a1
    Faulting module name: KERNELBASE.dll, version: 6.1.7601.18229, time stamp: 0x51fb1116
    Exception code: 0xe06d7363
    Fault offset: 0x0000c41f
    Faulting process id: 0x21dc
    Faulting application start time: 0x01cf8226b626ba92
    Faulting application path: C:\PROGRA~2\Seagull\BARTEN~1\BarTend.exe
    Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
    Report Id: 619da812-ee46-11e3-879d-0050568100af

     

    Is this nornal?

     

    Thanks,

     

    -Prashant Girennavar.

    0
  • Avatar
    Domingo Rodriguez
    Moderator

    I can see that you're not running the latest service release for BT v9.4. Would you still have the same problems if you install BT v9.4 SR3? Please also make sure to upgrade the Seagull License Server as well.

    http://www.seagullscientific.com/label-software/fixes_94.aspx

    0

Please sign in to leave a comment.