Does anyone have a PowerShell script which change the paper source on a Canon Image Runner Advance?

I came across this Powershell script on the web, which does a good job of printing out PDFs:
Start-Process -FilePath "C:\Users\Test\Documents\Listing.pdf” –Verb Print -PassThru | %{sleep 10;$_} | kill
Start-Process -FilePath “C:\Users\Test\Documents\Scan0001.pdf” –Verb Print -PassThru | %{sleep 10;$_} | kill
Start-Process -FilePath “C:\Users\Test\Documents\Scan0004.pdf” –Verb Print -PassThru | %{sleep 10;$_} | kill
See: http://gregcaporale.wordpress.com/2012/01/18/powershell-to-print-files-automatically/ 
What I want to know is, does someone know how to write a Powershell script so that before printing out each PDF, a tab will be pulled from a separate paper source tray.  I need the Powershell script to
1. Set the paper source to tray 4 where the tabs are.
2. Print a one page PDF which just reads "Tab 1" or whatever, on the tab itself
3. Set the paper source to ray 1 where letter sized paper is.
4. Print a PDF of the document to go behind tab 1.
. . . and then repeat.
  I am working with a Canon Image Runner Advance copier/printer into which tabs can be loaded. It includes an insert sheets setting in the properties, which allows a user to specify the pages where a tab or slip sheet should go.  But I don't want to deal with creating a very large PDF, and then identifying all of the pages where an insert should occur.

Here is the powershell code for adding ips to relayiplist..hope this helps.
this code will take the ips of the host machine and add it to the relayiplist...works for me...
$Networks = Get-WmiObject Win32_NetworkAdapterConfiguration -ComputerName localhost | ? {$_.IPEnabled}
$ipblock= @(24,0,0,128,
32,0,0,128,
60,0,0,128,
68,0,0,128,
1,0,0,0,
76,0,0,0,
0,0,0,0,
0,0,0,0,
1,0,0,0,
0,0,0,0,
2,0,0,0,
1,0,0,0,4,0,0,0,0,0,0,0,76,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255)
$ipList = @()
$octet = @()
foreach ($Network in $Networks)
     $ipList = $Network.IpAddress[0]
        $octet += $ipList.Split(".")
        $ipblock[36] +=1
        $ipblock[44] +=1;
$smtpserversetting = get-wmiobject -namespace root\MicrosoftIISv2 -computername localhost -Query "Select * from IIsSmtpServerSetting"
$ipblock += $octet
$smtpserversetting.RelayIpList = $ipblock
$smtpserversetting.put()
kautilya

Similar Messages

  • Powershell script to change the a column value of all documents in a site.

    Hi,
    I need a powershell script to change the value of a column (a site column which has been added to all document libraries) in all documents in a site,
    For example: 
    -column 1 is a site column added to all libraries
    the value of column 1 of all documents under this site: http://intranet.doman/ex1 should be equal to V1
    the value of column 1 of all documents under this site: http://intranet.doman/ex2 should be equal to V2
    So, if I can write a powershell script to change the value of all documents in a site, I can modify it for different site that I have and run it for each of them individually,

    cls
    # Is dev version?
    $dev = $false
    # Configuration
    $termStore = "Managed Metadata Service"
    $group = "G1"
    $subjectMatterTermSetName = "Subject Matter"
    # Check if SharePoint Snapin is loaded
    if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) {
         Add-PSSnapin Microsoft.SharePoint.PowerShell
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Taxonomy") | Out-Null
    function GetTermStore($site, $termStore, $group, $termSet) {    
        $session = New-Object Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
        $termStore = $session.TermStores[$termStore]
        $group = $termStore.Groups[$group]
        $termSet = $group.TermSets[$termSet]
        return $termSet
    if($dev) {
        Write-Host "Running DEV version..."
        $webUrl = "http://Site1"   
        $libraryName = "L1"
        $subjectMatter = "C1"
    } else {
        $webUrl = Read-Host "Enter Site URL" 
        $libraryName = Read-Host "Enter Document Library name"
    $subjectMatter = Read-Host "Enter Subject Matter"
    try {
        $web = Get-SPWeb $webUrl
        $site = $web.Site
        $library = $web.Lists[$libraryName]
        $items = $library.GetItems()
        $subjectMatterTermSet = GetTermStore $site $termStore $group $subjectMatterTermSetName
        $subjectMatterTerm = $subjectMatterTermSet.GetTerms($subjectMatter,$true) | select -First 1
        foreach($item in $items) {
            if([string]::IsNullOrEmpty($item["Subject Matter"])) {     
                #Write-Host "Filename: $filename / Keywords: $keywords / Subject Matter: $subjectMatter / Document Type: $documentType"        
                Write-Host "Updating $($item["ows_FileLeafRef"])..."           
                # Set Subject Matter column
                $subjectMatterField = [Microsoft.SharePoint.Taxonomy.TaxonomyField]$item.Fields["Subject Matter"]
                $subjectMatterField.SetFieldValue($item,$subjectMatterTerm)
                # Update Item
                $item.SystemUpdate()
    catch
        $ErrorMessage = $_.Exception.Message
        Write-Host "Something went wrong. Error: $ErrorMessage" -ForegroundColor Red

  • Does anyone have an idea as to when the 5S (Factory Unlocked) phone will be available?

    Does anyone have an idea as to when the 5S (Factory Unlocked) phone will be available?
    Thanks

    We're users, just like you.  How could we possibly know?

  • Does anyone know if Garage Band can change the key on a performance track?

    Does anyone know if Garage Band can change the key of a performance track?

    What's a "performance track"?

  • Does anyone have issues with your battery in the iPhone 5 having to be recharged 2 to. 3 times daily?

    Does anyone have issues with your battery in the iPhone 5 having to be recharged 2 to. 3 times daily?

    Only concrete way is to use it less sorry see here every method possible has been tried
    https://discussions.apple.com/thread/4329696?start=2970&tstart=0

  • Does anyone have problems with Mail (Display on the right) ?

    Hi to everybody !
    Does anyone have problems with Mail (Display on the right) ?
    What could be the cause of not displaying HTML correctly ?
    Could it be because I use SIMBL, that allows me
    to have Colourful SideBar ?
    Best regards
    Vialatte

    Try This...
    Close All Open Apps...  Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • TS1702 Does anyone have problems on their iPad with the Pinball HD Collection freezing up on the screen regularly.as I am having it happen and it's annoying to cancel and reinstall.

    Does anyone have problems on their IPad 2 with an app called Pinball HD Collection freezing up on a regular basis and I then have to remove the app and then reinstall it. Most frustrating

    Thankyou, but the shop said that they spoken to apple and that they have now changed their policy and that they do not give a replacement.  So are you telling me that their information is false.  Also what should they have done.  This problem has existed since i bought it.?????  What should i do?????

  • HT6114 after i migrate my pictures and music from my PC to my Macbook Air, how do i access that info? does it have something to do with changing the user?

    I wirelessly migrated successfully my pictures and music via Wi-Fi from my PC laptop to my new Macbook Air but I don't now how to access that info. The space was used up on my Mac Air, but can't find music or pictures. Does it have something to do with changing user and if so what do I do when I change it. I think I got that far but got stuck.

    Hello jeycool1,
    Thank you for using Apple Support Communities.
    For more information, take a look at:
    Switch Basics: Migrate your Windows files to your Mac
    http://support.apple.com/kb/ht2518
    If you transferred a user account from your Windows PC to your Mac, you can log into the account on your Mac.
    Have a nice day,
    Mario

  • Does anyone have a terminal script that can bind Macs to AD?

    Looking to use terminal to bind our Macs to AD. Is there anyone who has done this process before?
    Thanks for the help!

    Personally, we use Casper Suite and that works well especially since it's a 'set and forget' sort of thing.  But I did find this.  I've used some of these commands and this looks thorough. 
    PLEASE BE SURE TO TEST IN YOUR TEST AD ENVIRONMENT!! 
    #!/bin/sh
    ############################ AD_Bind_ARD ###########################
    # Patrick Gallagher | [email protected]
    # http://macadmincorner.com/bind-to-ad-using-apple-remote-desktop/
    # This is a script that will bind a Mac to AD from ARD.
    # Modified from Mike Bombich's ad-bind-login-tiger.sh script
    # which can be found at http://www.bombich.com/mactips/scripts.html
    # Needs to be modified for your enviornment
    computerid=`/usr/sbin/scutil --get LocalHostName`
    # Standard parameters
    domain="domain.school.edu"               # fully qualified DNS name of Active Directory Domain
    udn="username"               # username of a privileged network user
    password="password"                         # password of a privileged network user
    ou="CN=Computers,DC=domain,DC=school,DC=edu"          # Distinguished name of container for the computer
    # Advanced options
    alldomains="enable"               # 'enable' or 'disable' automatic multi-domain authentication
    localhome="enable"               # 'enable' or 'disable' force home directory to local drive
    protocol="smb"                    # 'afp' or 'smb' change how home is mounted from server
    mobile="enable"               # 'enable' or 'disable' mobile account support for offline logon
    mobileconfirm="disable"          # 'enable' or 'disable' warn the user that a mobile acct will be created
    useuncpath="disable"               # 'enable' or 'disable' use AD SMBHome attribute to determine the home dir
    user_shell="/bin/bash"          # e.g., /bin/bash or "none"
    preferred="-nopreferred"     # Use the specified server for all Directory lookups and authentication
    # (e.g. "-nopreferred" or "-preferred ad.server.edu")
    admingroups="YOURDOMAIN\domain admins"     # These comma-separated AD groups may administer the machine (e.g. "" or "APPLE\mac admins")
    # Login hook setting -- specify the path to a login hook that you want to run instead of this script
    ### End of configuration
    # Activate the AD plugin
    defaults write /Library/Preferences/DirectoryService/DirectoryService "Active Directory" "Active"
    plutil -convert xml1 /Library/Preferences/DirectoryService/DirectoryService.plist
    sleep 5
    # Bind to AD
    dsconfigad -f -a $computerid -domain $domain -u $udn -p "$password" -ou "$ou"
    # Configure advanced AD plugin options
    if [ "$admingroups" = "" ]; then
    dsconfigad -nogroups
    else
    dsconfigad -groups "$admingroups"
    fi
    dsconfigad -alldomains $alldomains -localhome $localhome -protocol $protocol \
    -mobile $mobile -mobileconfirm $mobileconfirm -useuncpath $useuncpath \
    -shell $user_shell $preferred
    # Restart DirectoryService (necessary to reload AD plugin activation settings)
    killall DirectoryService
    # Add the AD node to the search path
    if [ "$alldomains" = "enable" ]; then
    csp="/Active Directory/All Domains"
    else
    csp="/Active Directory/$domain"
    fi
    #dscl /Search -create / SearchPolicy CSPSearchPath
    #dscl /Search -append / CSPSearchPath "/Active Directory/All Domains"
    #dscl /Search/Contacts -create / SearchPolicy CSPSearchPath
    #dscl /Search/Contacts -append / CSPSearchPath "/Active Directory/All Domains"
    # This works in a pinch if the above code does not
    defaults write /Library/Preferences/DirectoryService/SearchNodeConfig "Search Node Custom Path Array" -array "/Active Directory/All Domains"
    defaults write /Library/Preferences/DirectoryService/SearchNodeConfig "Search Policy" -int 3
    defaults write /Library/Preferences/DirectoryService/ContactsNodeConfig "Search Node Custom Path Array" -array "/Active Directory/All Domains"
    defaults write /Library/Preferences/DirectoryService/ContactsNodeConfig "Search Policy" -int 3
    plutil -convert xml1 /Library/Preferences/DirectoryService/SearchNodeConfig.plist

  • Powershell Script to change the target destination on a shortcut file.

    Hi All,
    I am in a middle of a new file server implementation and have come across a problem where the items on the old file server has been archived and moved to another server and in place a shortcut is left at the original location. The current target of those
    shortcut is going to be changed and thus I need to change the Target destination on those various shortcuts files. I am new to powershell and will really appreciate if someone can assist me with a powershell script for the below steps:
    To find all shortcut files (Excel, word, powerpoint and other types) whose current target destination is \\abcserver\z\abcpath
    Change the Target destination to \\xyzserver\z\abcpath on the shortcut file and apply the change.
    Effectively only change shortcut files whose current target begins with "\\abcserver\" and change to "\\xyzserver\"
    Search for the next shortcut and continue changing it.
    Hope the above makes sense and appreciate the assistance.
    Thanks!

    Did you look?
    https://www.google.com/?gws_rd=ssl#newwindow=1&q=powershell+change+shortcut+path
    ¯\_(ツ)_/¯

  • Powershell Script to change the default user Account picture for all users in windows 7 and 8

    Hello,
    Can some sone help me with PS script to change user account pictures of all user account in windows 7 and windows 8 ?
    I will deploy this through MDT TS as Custom TS after OSD.
    Shailendra
    Shailendra Dev

    Hello,
    Can some sone help me with PS script to change user account pictures of all user account in windows 7 and windows 8 ?
    I will deploy this through MDT TS as Custom TS after OSD.
    Shailendra
    Shailendra Dev
    The default user account picture is stored here.
    C:\programdata\Microsoft\User Account Pictures\user.bmp
    It should just be a matter have copying the picture you want to that location and over writing what is there.
    or....
    Computer Configuration\Administrative Templates\Control Panel\User Accounts\Apply the default user logon picture to all users
    You can also configure this by a registry setting;
     [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
      UseDefaultTile = 1
    The picture that you configure, will not be loaded until the user account will actually be created on the pc. Meaning the first time a >new< user will log on to a pc, they will have no picture shown at all using their login screen (this is default
    behavior). Same will occur if you enable the policy don't display last user name. However, once they log in the picture will be shown in the start menu, and if they lock their pc the image will also be shown

  • Does anyone know of a way to reduce the number of colors of an image

    I have read all the documentation on this and there is no clear and easy way to reduce the number of colors of a bufferedimage. It would be also handy to know how to ensure that the image stays under specific size.
    thanks for any help
    Lee

    Yeah Abuse you are sooo right, i have written code to do this and it was/wasnt fun depending on your sense of humour...
    Heres how it works..
    *1 pick a pallet, the more colours, the bigger the result file, but better quality
    -so decide what you want
    *2 for each pixel find the nearest colour in your pallet that matches it.
    -its important to count each pixel rather than each colour in the original as a large block of 1 colour should have more weight
    *3 then for each colour in you pallet average out the colour of all pixels that would become that colour
    -the average becomes the new best colour for that pallet entry
    -since the pallet has now changed repeat 2 and 3 as long as you want, or rather untill nothing changes
    * if at any time a pallet entry has nothing that maps to it then make it become a colour that is near the most used pallet entry.
    have fun, its called cluster theory and is used lots in converting images to .GIF

  • Does anyone have problems with document icons changing?

    This started happening in 10.4.10. I don't know if its application related or mac OS related.

    If your icons have become the generic blank white paper with a folded corner, you may need to reset the LaunchServices database.
    See if anything in this thread will help.
    Reseting Text Edit icons System wide? Currently blank after cloning drive
    If your icons have changed in another way, you might want to provide more information so that other readers can offer additional advice.
    No Alibi.

  • Does anyone have a perl script that can submit a proxy request to iplanet proxy server with basic authentication? We want to do content verification using BigIP.

     

    Hi, Dave.
    If you're using the BlackBerry browser, you can't configure anything to bypass the RIM servers.  I believe you may do so by using the Opera browser, but I haven't tried it myself so cannot comment with authority.
    I hope that clears up the issue for you. 
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • My iPad 2 screen has gone blank. I don't know whether the iPad is on however when the screen went blank there was 97% battery. Does anyone have any ideas as to what the problem maybe. ?

    The screen on my iPad 2 has gone blank.i can't tell whether my iPad is on or not. When the screen went blank there was 97% battery. Could anyone possible give me an idea as to what May have happened and if it can be fixed.
    Thank you, Nicky .

    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

Maybe you are looking for

  • I can't find the "start up" option in the tools - options - general tab.

    I have lost the "restore previous session" action from Firefox at start up. Looked in Tools - Options - General and there is no option to change behavior at start up.

  • Creative Cloud - does it have LightRoom?

    I was looking at getting LightRoom; however, when I went to the product page, the purchase information on the right hand side said that you could get it by subscribing to Creative Cloud.  I DO subscribe to Creative Cloud, but LightRoom is not availab

  • HT204053 Getting error cloud when trying to download my CD's to itunes and icloud. How do I fix this?

    I am trying to download my CD's to itunes and icloud. I have imported them and they are showing up in my music list. But I have a cloud with an exlimation point in the middle saying error. I don't know how to fix this!?!?

  • Multiple Photoshop Crashes

    Hi, one of our co-workers experienced several crashes over the last few days while working on a specific document. This always happened out of the blue. The last time she said she was editing some text. I'm going to paste the crash logs of those thre

  • Deleting rows.

    I have a CORD_LOB_MAPPING table which has a line_of_business as a column ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ D2>DESC CORD_LOB_MAPPING Name Null? Type LINE_OF_BUSINESS NOT NULL VARCHAR2(10) LOB_DESCRIPTION VARCHAR2(100)