PXE phase use encrypted credentials

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 7 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
monoeagle
Posts: 108
Last visit: Fri Jan 26, 2024 10:44 am

PXE phase use encrypted credentials

Post by monoeagle »

Hi@All,

Action:

PXE --> run SelfService(from the used deploymentsolution)
properties are set in the selfservice(OS-->Win10; name of the client)
run PS Script <--- the Important Part
Exit SelfService --> OS Install starts

problem:

the PS Script does change an DB object because of a lack of functionality.
The problem is that I need the credentials which can do that.

For the test I use "Get-Credentials" and give them as parameter to the appropriate function.

The field engineer will doesn't get the credentials, but I need to automate it.

Now I'm searching for options.

Option 1:

I can Use SecureString to generate a Credentials Blob and integrate it in the preOSInstallPackage.
If the PS Script runs I "restore" the Credentials, but it may be safe as if I doesn't use SecureString or not?

Option 2:

Don't use the PS as Script --> generate an Executable an make it safe??

Option 3:

I'm always open for suggestions.

kind regards
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: PXE phase use encrypted credentials

Post by jvierra »

Credentials are not portable. They can only be used under the account that created the credential.
User avatar
monoeagle
Posts: 108
Last visit: Fri Jan 26, 2024 10:44 am

Re: PXE phase use encrypted credentials

Post by monoeagle »

Hi jvierra,

whats the difference between

----
pc starts --> pxe --> selfservice
ps script started
get-credentials --> technician wrote the credentials(for the webservice), which are needed into the popped up dialog and press enter

script does what it is made for
OS installation starts

----
pc starts --> pxe --> selfservice
ps script started
I hardcode the credentials(for the webservice) into the script

script does what it is made for
OS installation starts
----

both ways works.

Or is your answer in the direction to the usage of the securestring?
That I can encrypt and encode it just unter the same user?

regards
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: PXE phase use encrypted credentials

Post by jvierra »

A secure string is dependent on the user account.
User avatar
monoeagle
Posts: 108
Last visit: Fri Jan 26, 2024 10:44 am

Re: PXE phase use encrypted credentials

Post by monoeagle »

ok thanks
This topic is 7 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked