Deploying / Publishing a Custom Web-Part

There are three steps for deploying / publishing a custom web part : adding, installing, and activating. the following is the code for installing a new WSP

# Add the wsp file to the farm solution store repository
Add-SPSolution [full pathto to your WSP] 

# install the solution to the GAC
Install-SPSolution Identity NameOfWSP WebApplication http://domain  -GACDeployment

# activating the feature - before activating the feature make sure it was deployed across you farm server you can check the status of the deployment in your Central Admin.
Enable-SPFeature -Identity "FeatureName" -Url http://domain