Posts Tagged ‘Powershell’

Deploy Custom Webparts in SharePoint 2010

Depending on where you got a custom webpart from, or what it even does, the instructions to install it are not always clear.  In such scenarios, the following 2 commands may be useful to you.

Note:  Run these powershell commands from the location where your webpart is located.

stsadm -o addsolution -filename webpartname.wsp

Update-SPSolution –Identity webpartname.wsp –LiteralPath C:\temp\webpartname.wsp –GACDeployment

Configuring PowerShell Agent for UCMDB

To Configure PowerShell:
1) Enable PowerShell remoting.
– Launch PowerShell v2.0 as an administrator.
– Run the enable-PSRemoting cmdlet:
— Starts the WinRM service and sets the statup type to Automatic
— Enables a firewall exception for WS-Management communications
— Creates a listender to accept requests on any IP address

2) To trust all hosts, run the following from the command line:

Set-Item WSMan:\localhost\Client\TrustedHosts *

To Trust only restricted IP addresses, specific the addresses in place of the asterisk (*).

3) Restart WinRM by running the following from the command line:

Restart-Service winrm

Return top