locked
PowerShell display issue RRS feed

  • Question

  • I want to write a PS script to do a number of things.  First I want it to prompt for multiple users (right now just 2), enable the accounts of selected users, set account expiration date/time, and then display accounts with their associated expiration setting.

    The problem is that it is showing everything in my script on the screen.  I only want to see the prompt for the user accounts and the result of setting an expiration date/time of the account.

    Thoughts?

    Friday, July 27, 2018 2:16 PM

Answers

  • Solved my own problem.  Running it in the PS ISE produced all the code. but calling it by the file name did what I wanted. 
    • Marked as answer by DBS_1 Friday, July 27, 2018 2:21 PM
    Friday, July 27, 2018 2:21 PM

All replies

  • Would we be able to see your code? Obviously, change details that are sensitive.
    Friday, July 27, 2018 2:17 PM
  • Solved my own problem.  Running it in the PS ISE produced all the code. but calling it by the file name did what I wanted. 
    • Marked as answer by DBS_1 Friday, July 27, 2018 2:21 PM
    Friday, July 27, 2018 2:21 PM