Write powershell script taking 2 positional string arguments: strFileName and…
- User
Write powershell script taking 2 positional string arguments: strFileName and strOutputDir. If strOutputDir is available and not empty, then append to it filename with 2 parent directories (if any) extracted from strFileName. Change extension into ".txt" and create a file from the obtained path. Output string "hello" into the file.
- Assistant
Certainly! Here is a PowerShell script that takes two positional string arguments, and , and performs the actions as described: