Jump to content

Recommended Posts

Posted

Hi

We've had a PaperCut install done during the holidays and seem to have an issue.

 

The installer tested just from couple of PCs by going to \\servername\printer name and connecting to print, both a normal queue and a virtual queue for follow-me printing.

 

on some OU groups I have 1 GPO which has both Follow me (for print release) and a local print queue on the same server.

On others I just have the Follow me.

 

If I've logged on as a user onto 1 computer which has both printers, whenever you logon somewhere else both still show , so I am assuming it's travelling in the profile.

Remove both printers and log back on and only the correct ones get applied.

 

I've added the printers through the User Config , Printers, part of the GPO and linked it to the computer OUs, as I only want certain printers per OU.

 

If anyone else runs papercut, please could you let me know how you deploy the printers when you have multiple printers running on the print server.

 

Prior to this we always printed directly to IP printers (never had any issues) as I HATE print servers!

 

Thanks in advance. Need to get this sorted before Tuesday when the school return and the installer tells me it's a network issue rather than Papercut, but I disagree!

Posted

Unfortunately I'd be inclined to agree with your installer. (Was it ITS?)

 

We've had Papercut put in this summer also, to replace PCounter, but a) we've always used print servers, and b) we're RM CC4 which (usually) manages the print queues for us so I've no experience of the varied ways of allocating printers via OU and GPO.

 

There are I suspect several threads on here around the issue of print queues following users etc, but a vanilla person might come along and help you.

 

Peter

Posted
We deploy all of our printers via gpp as all of our printers are on a print server. The first printer mapping should be a delete all (push to the top of the list) this will then delete and old mappings before adding the correct printers. We've been this way for three years now. Rock solid no issues at all.
Posted

As above really, but just to confirm:

 

I've added the printers through the User Config , Printers, part of the GPO and linked it to the computer OUs, as I only want certain printers per OU.

 

Do you have it looped back properly? As if you're using User Config GPO but applying to Computers it wouldn't work as you wanted.

 

Not really sure why you want certain computers to certain OUs (If you mean in regards to Computer OU rather than staff), but would need looping for that.

 

Steve

Posted

Only just seen the responses but yes, I now have it so that the first option is delete all printer connections then add the ones needed in that OU.

 

We still have some local printers as they are not all part of the follow-me so only want users that log on to computers in a certain block to have the local one and not travel with them when go back somewhere else.

 

Any how it's all working as I need now.

Posted

I have also just noticed though that even with the single printer set through group policy, user configuration control panel, printers that is delaying the login by a considerable amount.

 

is there a fix to this?

Posted

How considerable do you call considerable?

 

If it's the first time a printer has been deployed to that machine it'll be pulling the drivers down from the server and installing them etc, so you could predeploy them into the driver cache etc

 

Steve

Posted
How considerable do you call considerable?

 

If it's the first time a printer has been deployed to that machine it'll be pulling the drivers down from the server and installing them etc, so you could predeploy them into the driver cache etc

 

Steve

 

It's adding about 15-20 seconds extra to the login time.

 

Student could get to desktop in 15 seconds, now 30

Staff user around 1 minute, but 1 min 20 to desktop.

 

Tested using same user on same PC logging in several times.

Posted
Point and print restrictions all configured? (If UAC etc on)

 

Steve

What should Point and Print settings be configured to, and in User or Computer configuration?

 

- - - Updated - - -

 

Printer appear as they should correctly, just adds a 15 second delay to the users login.

Posted
For printers, and mapping them, we moved to using a GPO object with all printers in, but not linked to any OU's, and then a powershell script to map - a modified version of Dramatically Reduce Logon “Time to Desktop” By Moving From Group Policy Preferences to Powershell Logon Script | AtumVirt

 

Do you have a modified sample script I could use as a starter as to where printer shares are specified.

I'd like to have it link printers by Computer OU so that depending on the OU it maps certain printers.

thanks.

Posted
No scripts with GPP. All GUI run. They're easy to set under a computer OU so that they are machine dependant, or you can use object filtering which is also GUI based.
Posted
No scripts with GPP. All GUI run. They're easy to set under a computer OU so that they are machine dependant, or you can use object filtering which is also GUI based.

 

I know there isn't in GPP, the message was in response to minimoo and the powershell scripts.

Posted

I think I ran pretty much what is in that post, in any case, current script i'm running is:

 

I found that, I had to replace $Domain = (Get-OHDomainInfo).Domain (just after BEGIN) with $domain = "actualdomain.sch.uk" and at the end of the script, need to specifiy the actually GUID of the gpo to look at. I think there's a few posts on internet of this technique, so script i'm actually using is from a different author I believe. There's a better write up (With screenshots) at from the original author at How to speed up login times using Group Policy Preferences and Powershell » Fear The Monkey . I've included version i'm running below in case i'd made any tweaks, but it looks same.

 

2 other things i've noticed causing slow mappings:

 

1) We use HP printers - mix of pcl5 and pcl6 universal drivers here - there's an issue with slow mapping @ "User may experience long delays when printing from a point and print client when host and printer are on different subnets" that's fixed in version 6 drivers for PCL6, but i think PCL5 still has issue until next release ;/

2) if you see slow printer dialog boxes - Solution: Very slow printer dialog boxes in Windows (network printers) | GeoPlanIT is intersting read - suggests adding a local port to the shared printer, instead of mapping to the shared printer. I'm definitely seeing something similar on a PC with a few different drivers, so want to experiment to see if there is any merit to that article.

 

#Requires -Version 3.0

#region General Script Info
<#
Author: OH
Date:   17 November 2014
Rev.    1.4

Purpose: Reads the Group Policy preference item for printers 
        and deploys \ deletes printers via Powershell script.


Change Log:
rev 1.4 Some targeting may include one or more 'OR' conditions.  Eg the computer must exist in this OU OR that OU.  This is now taken care of in the script.
rev 1.3 Fixed setting default printer.
rev 1.2 Added a check to see if there is a printer that is not targeted.  In other words, a printer that is deployed to all users that receive the GPO.
#>
#endregion

function Deploy-OHPrinters {
   [CmdletBinding()]
   param (
       [Parameter(Mandatory=$true)]                       
       [string]
       $GPOGuid        
   )

   BEGIN {
       $Domain = (Get-OHDomainInfo).Domain
       [xml]$PrintersXml = Get-Content "\\$Domain\sysvol\$Domain\Policies\$GPOGuid\User\Preferences\Printers\Printers.xml"        
       $ComputerOU = (Get-OHDomainInfo).ComputerOU        
       
       #GPP Target object info (Added for code readability)
       [int]$Computer = 0
       [int]$User = 1 
   }

   PROCESS {
       foreach ($Printer in $PrintersXml.Printers.SharedPrinter) {
           #If there is no targeting information and printer is set to create or update ie, this printer is targeted to everyone that receives this GPO...
           if ($printer.filters.ChildNodes.UserContext -eq $NULL -and ($printer.Properties.action -eq 'C' -or $printer.Properties.action -eq 'U')) {
               if ($printer.Properties.default -eq 1) {
                   Add-OHPrinter -Printer $Printer.Properties.path -Default    
               } else {
                   Add-OHPrinter -Printer $Printer.Properties.path
               }  
           }

           #Continue only if the target item in the GPP policy is against a computer object.
           if ($printer.filters.ChildNodes.UserContext -eq $Computer) {
               #The following 'foreach' line: The GPO could contain an 'or' target. eg 'If the computer exists in this OU OR that OU' so we had better check this... 
               foreach ($OUTarget in $printer.filters.ChildNodes.Name) {
                   if ($OUTarget -eq $computerOU){
                       switch ($Printer.Properties.action) {
                          'C' {                            
                                  if ($printer.Properties.default -eq 1) {
                                      Add-OHPrinter -Printer $Printer.Properties.path -Default    
                                  } else {
                                      Add-OHPrinter -Printer $Printer.Properties.path
                                  }  
                              }#end 'Create'
                          'U' {
                                  if ($printer.Properties.default -eq 1) {
                                      Add-OHPrinter -Printer $Printer.Properties.path -Default    
                                  } else {
                                      Add-OHPrinter -Printer $Printer.Properties.path
                                  } 
                              }#end 'Update'
                          'D' {
                                  Delete-OHPrinter -Printer $Printer.Properties.path
                              }#end 'Delete'                
                       }#end Switch            
                   }#End Inner If 
               }#end inner foreach
           }#End Outer If 
       }#end outer foreach    
   }#end process
}#end function

function Add-OHPrinter {
#region Function Notes
<#
Using the com-object model for creating a printer connection
as we are using Powershell 3.0 here with Win 7SP1 Computers.
#>
#endregion
   [CmdletBinding()]    
   Param
   (        
       [Parameter(Position=0)]
       [string[]]
       $Printer,        
       
       [switch]
       $Default
   )
   
   BEGIN {
       Write-verbose "Creating COM object"
       $Printers = New-Object -ComObject WScript.Network 
   }


   PROCESS {
       foreach ($p in $Printer) {
           Write-Verbose "Adding the printer"
           $Printers.AddWindowsPrinterConnection($p)

           If ($default) {
               Write-verbose "Setting default printer"
               $Printers.SetDefaultPrinter($p)
           }
       }#end foreach
   }#end process

   END {}

}

function Delete-OHPrinter {
#region Function Notes
<#
Using the com-object model for deleting a printer connection
as we are using Powershell 3.0 here with Win 7SP1 Computers.
#>
#endregion
   [CmdletBinding()]    
   Param
   (        
       [Parameter(Position=0)]
       [string[]]
       $Printer
   )
   
   BEGIN {
       Write-verbose "Creating COM object"
       $Printers = New-Object -ComObject WScript.Network 
   }


   PROCESS {
       foreach ($p in $Printer) {
           Write-Verbose "Deleting the printer"
           $Printers.RemovePrinterConnection($p)
       }#end foreach
   }#end process

   END {}

}

function Get-OHDomainInfo {
#region Function Notes
<#
   Using this method to obtain the Computer OU and Domain as this script
   is run on domain computers that do not have access to the Active Directory powershell module.
   Otherwise, we could have used Get-ADComputer and this whole function would have been
   a lot easier and more 'readable'...
#>
#endregion
   $objDomain = New-Object System.DirectoryServices.DirectoryEntry  
   $strFilter = "(&(objectCategory=computer)(name=" + $env:computername + "))"

   $objSearcher = New-Object System.DirectoryServices.DirectorySearcher  
   $objSearcher.SearchRoot = $objDomain  
   $objSearcher.Filter = $strFilter

   $ComputerOU = $objSearcher.FindOne().Path

   $pos = $ComputerOU.indexOf(",")
               
   #Now get the domain...
   [string]$Domain = $objdomain.distinguishedName
   $domain = $domain.Replace("DC=","")
   $domain = $domain.Replace(",",".")

   #And the OU the computer belongs to...
   $ComputerOU=$ComputerOU.substring($pos+1)

   #Return an object...
   [PSCustomObject] @{
       Domain = $Domain
       ComputerOU = $ComputerOU            
       PSTypename = 'MyTypes.OHComputerDomainInfo'
   }
}

#Entry point to the script
Deploy-OHPrinters -GPOGuid "{***ENTERGUIDHERE***}"

Posted
We deploy all of our printers via gpp as all of our printers are on a print server. The first printer mapping should be a delete all (push to the top of the list) this will then delete and old mappings before adding the correct printers. We've been this way for three years now. Rock solid no issues at all.

 

have you never noticed a 15 second extra logon delay when deploying printers this way?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...