0

Is it possible to remove the timestamp when Export-DBAScript -PATH is used? I would just like to use the Server Name and Date.

For example this is what I want to export:

Get-DbaAgentJob -SqlInstance $ServerList| EXPORT-DBASCRIPT -PATH $FILENAME -Append

This is what my Output File is named (I would like to not have the timestamp): FileName with Timestamp

Is this is possible, and if so how I would go by achieving this?

Toastrackenigma
  • 7,604
  • 4
  • 45
  • 55
  • Use `-FilePath` parameter for exact file name – astentx Nov 03 '20 at 14:03
  • You should paste your code directly into question and not via image. Check the help on code formatting in the top-right corner of input field. – astentx Nov 03 '20 at 14:12
  • @astentx, when I use -FilePath, I have to specify the name, If I am exporting Jobs from multiple servers they are all in one file, I wanted to know if there is a way to change this default filename using -Path as it exports the script per a server. I just need to remove the Timestamp. Is it possible by using -Path? Thanks for the heads up WRT to code pasting. – KavzB16 Nov 05 '20 at 07:11

0 Answers0