Powershell script not working in uat and production

Jayesh N 1 Reputation point
2022-01-21T20:50:13.097+00:00

Powershell script used to convert excel file to csv file, it is working fine in dev environment but it is not working in uat and production , what might be the error and how to overcome from this.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,381 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 45,091 Reputation points
    2022-01-21T22:30:58.477+00:00

    How would we know what might be the error?

    Use the "Code Sample" editor to post your script (it's the 5th icon from the left on the Format Bar; the one with the "101 010" graphic), or attach the script (as a .TXT file) to your post.

    Does the script produce any error output? Does the script abort or does it run to completion but produces no output? HOW does the script not work?

    0 comments No comments

  2. Limitless Technology 39,376 Reputation points
    2022-01-31T11:52:50.803+00:00

    Hello JayeshN,

    Thank you for your question and reaching out.

    I can understand you are facing issue with PowerShell script in your Prod Environment.

    To troubleshoot more You can use Start-Transcript and Stop-Transcript cmdlets in your PowerShell scripts to natively log all actions and outputs.

    Start-Transcript -Append C:\Temp\Logs\PSScriptLog.txt

    <Your script code.>

    Stop-Transcript

    Also , Verify that it is started with Elevated prompt and also Please disable any Antivirus program or Windows firewall you may have for temporary purpose.


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments