Powershell 4.0 How to use Add-Printer to add printer for all users (machine)

Is there a way I can use Powershell 4.0 Add-Printer cmdlet to add a printer for all users (machine)?  I tried from an admin account but it only adds a printer for the currently logged on user.
thanks.

Adding a printer for all users requires having access to their profiles (and registry hive for user) to save the mapped printer information. Your best bet is to either use Group Policy Preferences or write a user logon script that ones when they log in and
maps the printer if not already mapped. 
Group Policy Preferences Example
I wrote an article a while back that shows how to use a GPO logon script to map a printer. It doesn't use V4, but the process would be the same as far as a GPO goes.
http://learn-powershell.net/2012/11/15/use-powershell-logon-script-to-update-printer-mappings/
Boe Prox
Blog |
Twitter
PoshWSUS |
PoshPAIG | PoshChat |
PoshEventUI
PowerShell Deep Dives Book

Similar Messages

  • How to use quota on a desktop folder for all users with File Server Resource Manager.

    Hi there,
    I'd like to know if there is a posibility to use variables in the path with File Server Resource Manager if you want to set the quota.
    The path I'd like to use is d:\home\%username%\desktop.
    Like to hear from you all if there is a solution or workaround for this one :)
    Thanks for your time.
    Ben.
    Ben van der Meer

    That's a question about Automator, so I'd pop that one here
    http://discussions.apple.com/forum.jspa?forumID=1339
    Regards
    TD

  • How do I set Firefox to be usable for all users on one computer?

    How do I set Firefox to be usable for all users on one computer?

    I would think the about:config entries discussed are ex-factory set to values each user has to change individually, after the installation has run its course. The solution could be to have patched files ready to install post factum:
    [https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences A Brief Guide to Mozilla Preferences - MDN]

  • How to set up new enviroment variables permanently for all users?

    Hi.
    I downloadad Apache Tomcat, and need to set enviromental variables for all users.
    I tryed setenv commad, but it is not found.
    for example # JAVA_HOME="/opt/jre1.6.0" Solaris remembers this variable only for one session and I need for all users permanently.
    Thanks.

    Thank you.
    This file contains a script. Is there difference in putting that line in beginning or end of the file?
    #ident     "@(#)profile     1.19     01/03/13 SMI"     /* SVr4.0 1.3     */
    # The profile that all logins get before using their own .profile.
    trap ""  2 3
    export LOGNAME PATH
    if [ "$TERM" = "" ]
    then
         if /bin/i386
         then
              TERM=sun-color
         else
              TERM=sun
         fi
         export TERM
    fi
    #     Login and -su shells get /etc/profile services.
    #     -rsh is given its environment in its .profile.
    case "$0" in
    -sh | -ksh | -jsh | -bash)
         if [ ! -f .hushlogin ]
         then
              /usr/sbin/quota
              #     Allow the user to break the Message-Of-The-Day only.
              trap "trap '' 2"  2
              /bin/cat -s /etc/motd
              trap "" 2
              /bin/mail -E
              case $? in
              0)
                   echo "You have new mail."
              2)
                   echo "You have mail."
              esac
         fi
    esac
    umask 022
    trap  2 3
    # Intel Server Control - The following lines
    # let the LRA daemon access the X server
    if [ -f /usr/bin/X11/xhost -a -f //isc/lra ]
    then
         ttyname=`tty`
         ttyname=`basename $ttyname`
         ttykind=`tty | egrep "console|vt"`
         whereami=`finger -s | grep $ttyname | cut -c61-`
         if [ "$whereami" = "" -a "$ttykind" = ""  ]
         then
              CURDIS=$DISPLAY
              DISPLAY=unix:0.0
              export DISPLAY
              /usr/X/bin/xhost +unknown 2>/dev/null 1>/dev/null
              DISPLAY=$CURDIS
         fi
    fi

  • How to set a customized search results template for all users

    Hi.
    I know the customized search results views are stored in a file called pne_portal.hda that resides on every user's subfolder in data/users/profiles/...
    Is there a way to set a customized search results template for all users? If it's impossible, is there a way to modify the Headline view? I'm not able to find the resource or template where this view is.
    Thanks in advance.

    I wasn't able to understand what was meant by this post. Therefore, I modified the standard template HeadLine View.
    Columns for this template are defined in the include slim_search_result_table_header_setup (in std_page.htm).
    Here is the modification of the code:
    <$if customTemplateId and not (baseTemplateId like customTemplateId)$>
              <$columnsString = utGetValue("customlisttemplates/" & strLower(customTemplateId), "columns")$>          
              <!-- Modify START by Oracle-->
         <$else$>
    <!-- here add default fields -->
              <$columnsString="dDocName,dDocTitle,dInDate,dDocAuthor"$>
    <!-- here add your custom fields -->
              <$columnsString=columnsString&",xComment"$>
              <!-- Modify END by Oracle-->
         <$endif$>

  • How do I set the about:config settings for all users? iprism keeps prompting from authentication for users.

    When users log on and try to open Firefox 23.0.1, users are prompted with Iprism Authentication. We made changes to the firefox about:config values "network.automatic-ntlm-auth.allow.-non-fqdn" and "Network.negotiate-auth.allow-non-fqdn" to true and it works, but only works on a per user basis. How can we set this up for all users?

    I would think the about:config entries discussed are ex-factory set to values each user has to change individually, after the installation has run its course. The solution could be to have patched files ready to install post factum:
    [https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences A Brief Guide to Mozilla Preferences - MDN]

  • How to set environment variables in mac mavericks for all users

    Can someone here tell me the file to set JAVA_HOME environment variable for all users?
    Thanks!

    nara999999,
    the file in which to set the environment variable depends upon the login shell of each user. Presuming that every user has bash as his login shell, and that the environment variable will be needed only in interactive shells, then the file to edit will be /etc/bashrc; if the environment variable will also be needed in non-interactive shells, then  /etc/profile should be edited instead (and this will also cover users with either sh or zsh as their login shell). If ksh is used as a login shell, then /etc/ksh.kshrc will need to be edited. If csh or tcsh is used as a login shell, then /etc/csh.login will need to be edited.

  • How do I set the default audio output for all users

    Here's the story. I have a Mac Pro in a classroom that is connected to the audio system via the digital (Toslink) output. The systems are bound to AD and OD with some minor management being performed via MCX (printers, login, etc...)
    When a new user authenticates to the system the output defaults to the internal speakers not the Digital Out.
    My assumption was that I could configure default 0 key in the com.apple.audio.SystemSettings.plist to AppleHDAEngineOutput:1B,0,1,4:2, which is the digital output.
    However it seems that new users are still generated with the Internal Speakers which is AppleHDAEngineOutput:1B,0,1,2:0.
    Is there somewhere else that I can configure that default such that all users will default to the Digital Out, AppleHDAEngineOutput:1B,0,1,4:2? Or am I perhaps not configuring the SystemSettings plist correctly?
    Most of these tasks were previously taken care of by another technician but he has left and I'm quickly trying to pickup the slack for configuration of our Macintosh environment.
    Thanks,
    -alex-

    Best answer I could find: [https://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/#comment-132668]
    If you can figure out how to add the printer name, this can be used to lock the margins.

  • How can I create a variant in CAT2 for all users?

    I am using SAP version 4.6c
    In the CAT2 screen I have a variant "Basic settings" if I change this it affects all users.
    I want to create another variant, so that the users can choose between them.
    But when I create another, it is only avilable for my own user. Can somebody tell me how to deploy it to all users?
    Thanks,
    /Finn

    Hi,
    I dont know about the CATS system. But when ur user selects the varaint, he should remove his own id and execute the query. This should display all the variants existing for that program. Then he can select the required variant.
    The user can also save this varaint under his own ID
    Hope it helps.
    Regards.
    Jay Gandhi

  • How to create general message in sap screen for all users

    Hi Forum
    I am using ECC6 version and i want to keep a message for all the users for assistance (like who is the administrator,contact number,mail id, etc)
    Can anyone show me how to do this and also i want to know what is sm02 is used for?
    Regards
    Friend

    You can do this by creating a message at the logon screen
    Read SAP Note 205487
    SM02 is used to send system messages like prior a system downtime or a scheduled maintainance, etc.
    regards
    Juan

  • How do I turn off password at login for all users?

    I want to keep separate users but I don't want a password requirement to login for any user. How do I turn off the password requirement at login altogether?

    Its not only a matter of other people, but also any software-based threats or even mishaps. For instance, there are some Terminal commands that can be executed by a program, script, or even another user that require authentication. If you do not have a password set then these can be executed directly with administrative privileges. Some of these can be disastrous to the system if used incorrectly.
    I agree for the most part if your system is fairly isolated then this is not much of an issue, but there is the rare possibility of malware or simple user mistakes that a good password helps guard against.

  • How to hide ribbon but show welcome control for all users using security trimmed control in sharepoint 2010

    Hi All,
    I have a requirement to hide ribbon in a document library for the read permission users. I have applied SPSecurityTrimmedControl, it is working for the read permission user but for the whole site it is hiding and also unable to see the welcome control,
    like user name, sign in as different user, etc.,
    <Sharepoint:SPSecurityTrimmedControl runat="server" ID="spTrimRibbon" PermissionMode="All" Permissions="ManageLists">
    I want to apply SPSecurityTrimmedControl to specific list/library with welcome control. Can someone please help me here.
    I Appreciate your assistance...
    MercuryMan

    Hello MercuryMan,
    I guess you have applied your code in master page that's why it is hidden from site. To hide specific list ribbon, go to your list-->and edit the page-->then add content editor webpart and apply below script.
    <SharePoint:SPSecurityTrimmedControl PermissionsString="ManagePermissions" runat="server">
    <div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
    </div>
    </SharePoint:SPSecurityTrimmedControl>
    http://blogs.msdn.com/b/sharepointdev/archive/2012/04/30/how-to-hide-the-ribbon-in-sharepoint-2010-rajeswari-mohandas.aspx
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to set Password expiration at 45 days for all users (new or existing)

    Hey all please suggest suitable way to set password expiration at 45 days of all application users.
    i am using APPS R -12.1.3 ...

    reply with possible ways.
    URGENT...

  • How can I configure FireFox security setting globally for all users on a PC? Is there something I can do in group policies or throught the registry to insure all users have the same settings?

    Our Bank's core processor has rewritten their product to run in a web browser. Their browser of choice is Firefox 3.6. The specifications from our core processor specify specific security and settings parameters that must be adhered to by all users for their product to run properly. Is there a way to globally configure these settings via the registry or group policies to insure everyone who logs in to a given workstation opens Firefox with the same settings? Thank you for any assistance you can provide - Steve Gish, First Bank Kansas.
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

    You can try:
    *http://kb.mozillazine.org/Locking_preferences

  • How can I disable javascript in Firefox 30 for all users on my Solaris 10 x86 box?

    I have a Solaris 10 box in a secure environment (no Internet) with Firefox 30 installed. I need to lock javascript in a disabled state for all users. I realize each individual user can toggle javascript with about:config, but that is only a per/user activity. I want to set the value of javascript.enabled to false for all users. Additionally, no user should be able to modify this setting.
    Is there a location with a config or prefs file that will affect all users?

    Try: http://kb.mozillazine.org/Locking_preferences

Maybe you are looking for