0

I downloaded the following PowerShell script from this page. This script is supposed to generate random passwords:

http://blog.simonw.se/powershell-generating-random-password-for-active-directory/

The issue is that when I run that script from PowerShell, I get no output even after I use the parameters as shown in the example. Any help would be appreciated. Thank you.

1 Answer 1

1

Are you running the script or the function? That script just defines a function. If you want to use it try:

. pathtoscript
New-SWRandomPassword
Sign up to request clarification or add additional context in comments.

3 Comments

I'm running the script. Tried "./New-SWRandomPassword" (without quotes) from the directory it's stored in but no output. Also tried the full path but same result.
My output from PowershellISE PS M:\Scripts> . .\New-SWRandomPassword.ps1 PS M:\Scripts> New-SWRandomPassword Cg"3RxARo
You aren't doing what Jason told you. Open Powershell, type a period, press space, then the path to your script that you downloaded (including file name), and any arguments. This is called Dot Sourcing, and is something you should probably Google and educate yourself about.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.