I advise against it. But if you must use a logon script to authenticate, here's how to get it done with PowerShell. In my PowerShell training classes or at conferences I inevitably face the question ...
ChatGPT can create PowerShell scripts for you. These proof-of-concept examples show how to find large files, list installed apps, and automate Windows tasks.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results