Wrapping up powershell script - #23
Draft
eld120 wants to merge 8 commits into
Draft
Conversation
…uctions within the README should direct the user to set an execution policy prior to this script being run.
…nd if not found create a new ssh key pair for the current user
ChrisForti
approved these changes
Sep 27, 2023
stephenlauck
requested changes
Sep 28, 2023
| `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. |
Contributor
There was a problem hiding this comment.
What if we just combine this with the command below? Just put it on same command.
Collaborator
Author
There was a problem hiding this comment.
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 |
Contributor
There was a problem hiding this comment.
Why are you setting a variable here? Could you just do this inline in the conditional?
Collaborator
Author
There was a problem hiding this comment.
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
stephenlauck
approved these changes
Sep 28, 2023
…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
marked this pull request as ready for review
September 28, 2023 22:26
HarmonyMorse
marked this pull request as draft
September 28, 2023 22:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.