Open Visual Code - Open New Workspace
In Vs Code - Extension - Search for - Power Platform VS Code Extension -> Install
Open Terminal - check for command
pac (It gives the version of power cli)
check for Authorization
pac auth list (if list is there delete the list for fresh start)
pac auth delete --index 1 (if no list is found create auth)
pac auth create --url https://org.crm.dynamics.com/ (it will ask for user name and password )
After successful of creation - check for the auth
pac auth list
To download portals check for paportal
Microsoft Power Platform CLI command for portals is “paportal”.
on the terminal - enter pac
pac (if paportal is there check for the portal list)
pac paportal list (It will give the website ids of paportals of the organisation)
Connected to...Portal Environment
Index WebSiteId Friendly Name
[1] xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx Starter Portal
Using website id download portals to local path
pac paportal download --path "C:\Users\CRM\Repos" --webSiteId xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
after portal download connect to git for commit - install git on machine - and check git branch
git branch (if no git is available try to connect to git and clone it the repos)
git clone https://dev.azure.com/trial/Po/_git/repos (it will clone azure repos to local machine)
after connection - check git branch - check in the code
git add <foldername/content> (add all the files to push to the git repos branch)
git commit -am "changes content" (commit all the changes)
git push (This will move all the changes to git repos branch)
after push -- connect to target organisation using
pac auth create --url https://..... (Create new Organisation Auth )
pac auth select --index x (This will connect to the target organisation - based on target index x value)
upload your changes to the target url
pac paportal upload --path "Git\Users\CRM\Repos" --deploymentProfile "profile-name"
check your changes on target environment.....
Comments
Post a Comment