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

fixed Get/Set config #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Plork
Copy link
Contributor

@Plork Plork commented Sep 13, 2016

Get/Set config are creating a SecretServer_$($env:USERNAME).xml and the psm1 is looking for SecretServer.xml. If you want to implement a config per user I would store it in ~ \SecretServer

are creating a SecretServer_$($env:USERNAME).xml and the psm1 is looking for SecretServer.xml. If you want to implement a config per user I would store it in ~ \SecretServer
are creating a SecretServer_$($env:USERNAME).xml and the psm1 is looking for SecretServer.xml. If you want to implement a config per user I would store it in ~ \SecretServer
Conflicts:
	SecretServer/Public/Get-SecretServerConfig.ps1
	SecretServer/Public/Set-SecretServerConfig.ps1
Copy link
Collaborator

@Jaykul Jaykul left a comment

Choose a reason for hiding this comment

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

I think you've overlooked the fact that this module expects to be built (with the build.ps1 script).

These path changes might be fine if you're running it from source control, but that's not how it's deployed. You can't write in $PSScriptRoot.. because after build that would be the "Modules" folder.

@Plork
Copy link
Contributor Author

Plork commented Sep 26, 2016

Oke but where during the build do you supply the url to SecretServer? since
it will be saved in the xml. I tried to make a new session with
passthrough, updateconfig to false and supply the $webproxy but not all
functions support this.

And yes I am trying to make this work in a build script and don't like the
hardcoded xml in the module. We have a different Secret Server for
production and our DTA (dev test .. etc).

Op ma 26 sep. 2016 om 07:02 schreef Joel Bennett [email protected]:

@Jaykul commented on this pull request.

I think you've overlooked the fact that this module expects to be built
(with the build.ps1 script).

These path changes might be fine if you're running it from source control,
but that's not how it's deployed. You can't write in $PSScriptRoot..
because after build that would be the "Modules" folder.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#18 (review),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEBGLw1dZ5lYJOSW_fK2TMhN9erItEGDks5qt1HOgaJpZM4J8IvI
.

@Jaykul
Copy link
Collaborator

Jaykul commented Oct 8, 2016

You don't supply the url at build time. Users have have to supply the url.

I guess the confusion is that nobody bothered deleting the .psm1 from source control -- that file does not end up in the module output by the build. The .psm1 is generated by the build script from all the script files.

From the developer point of view, the idea is that you run build.ps1 and the output goes into a version-numbered folder like 1.6.1.0 which contains the module ready for use or release (i.e. via Publish-Module) to the PowerShell gallery. The ReadMe should probably be updated.

Anyway. Users set the URL (using New-SSConnection) after it's installed (using Install-Module)...

@Plork
Copy link
Contributor Author

Plork commented Oct 13, 2016

Only thing I dont get is why you store it in an XML then when you always need to run New-SSConnection after import / before use. Just keep it in the variable SecretServerConfig at all times.

If you "stored" it you would need to retreive the config with Get-SSconfig before use (which i just as much effort as New-SSconfig if you don't know for sure it's there ;)

@Jaykul
Copy link
Collaborator

Jaykul commented Oct 24, 2016

If I ever get around to doing more work on this ... one of the things I would so is load the config automatically at module import once it's been configured ...

@Plork
Copy link
Contributor Author

Plork commented Oct 25, 2016

Shouldn't be hard to do, check if xml exist if so bla bla ... will see If I
can do that.

Op ma 24 okt. 2016 om 06:01 schreef Joel Bennett [email protected]:

If I ever get around to doing more work on this ... one of the things I
would so is load the config automatically at module import once it's been
configured ...


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#18 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEBGL1B6fZbq7pl0G5qeLEkSiE1IRt8rks5q3C2ygaJpZM4J8IvI
.

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.

2 participants