Skip to content

Wrapping up powershell script #23

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Wrapping up powershell script #23

wants to merge 8 commits into from

Conversation

eld120
Copy link
Collaborator

@eld120 eld120 commented Sep 26, 2023

No description provided.

README.md Outdated
`Set-ExecutionPolicy Bypass`
`./powershell-test.ps1`
On Windows do the following:
- open powershell as administrator set the system's security policy: `Set-ExecutionPolicy RemoteSigned` This allows scripts to be run locally while requiring scripts downloaded from the internet to be digitally signed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we just combine this with the command below? Just put it on same command.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can make that happen

# Create ssh key pair if it does not exist for a given user
# gets env username : [Environment]::UserName
# gets user's home path: $env:USERPROFILE
$userName = [Environment]::UserName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you setting a variable here? Could you just do this inline in the conditional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm setting the variable above the conditional as it's called in the if and else clause (and also the cloud-init yaml file that I'm working on).

I'm also unfamiliar/uncertain of the scope of this variable but I'm hopeful that it will be available from the yaml file anyway.

…no longer requires admin privileges but only sets the execution policy for the current powershell session
…sociated keys along with the current user's username as the key/username to be passed to the multipass instance. I chose a separate key/username because most of us will have used our email/ssh combination when we set up SSH with github - I'd like to keep that separate/unchanged.

Unsure of the scope of my powershell variables -  afaik they are local/limited to the shell session

Currently blocked by the lack of an IPv4 network address for our multipass instance, working on a network config or a command/flag to pass to multipass launch to set up a network extension. Looking up port forwarding via Virtualbox (unsure if this is sufficient)
@HarmonyMorse HarmonyMorse marked this pull request as ready for review September 28, 2023 22:26
@HarmonyMorse HarmonyMorse marked this pull request as draft September 28, 2023 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants