ForceCode: Generate and set Credentials for Scratch Orgs (Powershell)
This file contains 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
sfdx force:user:password:generate | |
$myOrg = (sfdx force:org:display --json | ConvertFrom-Json).result | |
$forceConfig = Get-Content .\force.json -Raw | ConvertFrom-Json | |
$forceConfig.url = $myOrg.instanceUrl | |
$forceConfig.username = $myOrg.username | |
$forceConfig.password = $myOrg.password | |
$forceConfig.apiVersion = "40.0" | |
$forceConfig | ConvertTo-Json | Out-File -FilePath force.json -Encoding utf8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
very nice! I'll look into integrating this.