Import-Csv and If statment RRS feed

  • Question

  • Hello

    I have a CSV file with 4 columns: UserName , WorkstationName ,OldPrinter, NewPrinter. 
    My Goal is to be able to change for each user's Default Printer from the Old Printer to the new printer using a logon script: If the UserName + Workstation + OldPrinter are all true then replace the default printer with NewPrinter.
    I thought using Import-csv  ,ForEach and IF statement with no success.

    • Moved by Bill_Stewart Monday, May 7, 2018 10:04 PM This is not "scripts on demand"
    Wednesday, March 7, 2018 7:51 AM

All replies

  • Hello,

    What have come up with so far?

    Post your code and we'll help you to adjust it to your needs bu we won't write you a script from scratch.

    Wednesday, March 7, 2018 8:07 AM