Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expect like capability with PowerShell #4951

Closed
manofspirit opened this issue Sep 29, 2017 · 3 comments
Closed

Expect like capability with PowerShell #4951

manofspirit opened this issue Sep 29, 2017 · 3 comments
Labels
Issue-Enhancement the issue is more of a feature request than a bug Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-Answered The question is answered.

Comments

@manofspirit
Copy link

Hi there,

I'm just trying to find a tech for macOS which can be used to automate CLI commands, Like Expect https://en.wikipedia.org/wiki/Expect

So can i use PowerShell for that?

Please advise.

@iSazonov iSazonov added the Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a label Sep 29, 2017
@SteveL-MSFT SteveL-MSFT changed the title [MacOs] Automate CLI Commands with PowerShell Expect like capability with PowerShell Sep 29, 2017
@SteveL-MSFT SteveL-MSFT added the Issue-Enhancement the issue is more of a feature request than a bug label Sep 29, 2017
@SteveL-MSFT
Copy link
Member

I don't think you could do this easily in PowerShell today, but there are ways with PowerShell to redirect stdin/stdout of a console app. Perhaps this is something we could have better support for once we have DSL available.

However, you should be able to use Expect within PowerShell today.

@rkeithhill
Copy link
Collaborator

There is a PowerShell module that is supposed to mimic Expect in PowerShell. https://www.powershellgallery.com/packages/Await/0.8

@SteveL-MSFT SteveL-MSFT added the Resolution-Answered The question is answered. label Sep 29, 2017
@SteveL-MSFT
Copy link
Member

@rkeithhill awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement the issue is more of a feature request than a bug Issue-Question ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a Resolution-Answered The question is answered.
Projects
None yet
Development

No branches or pull requests

4 participants