question

Richkm-1820 avatar image
0 Votes"
Richkm-1820 asked

is any way in MEM Portal to use user accout as varibale in script

Hello Expert,
I need to rename a computer that is hybrid autopilot device using script deployment but current I am using account credential for this in script. like below
$password = ConvertTo-SecureString "Password" -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential ("abc\admin", $password)
Rename-Computer -ComputerName "localhost" -NewName $newname -DomainCredential $Cred -Force
is there any way to use domain user account as variable in script so I don't need to provide password in script. any way intune...otherwise I will look on scripting view to change it .

Thank
rich

mem-intune-generalmem-intune-device-configurations
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers