Wednesday, October 23, 2013

Steps to run the commands in client machine for the scripts that are there in Server


First and foremost thing is we need to set execute policy to bypass in both client and server machines.

 

Script that we need to execute in the client machine:

 

param ($DropLocation="\\MD1DEVVSPEAPP01\Scripts", $Server="MD1DEVVSPEAPP01")

$secpasswd = ConvertTo-SecureString "68qZxpTi" -AsPlainText -Force;

$cred = New-Object System.Management.Automation.PSCredential ("JDA\jnetsvcQAfarm", $secpasswd);

Invoke-Command -Args ($DropLocation) -Script {

                param($DropLocation)                

                Add-PSSnapin Microsoft.SharePoint.Powershell;

                $script = Join-Path $DropLocation "SPServicesStart.ps1"

                . $script 

} -ComputerName $Server -auth CredSSP -cred $cred

 

 

No comments:

Post a Comment

SharePoint 2013 - ADFS - Configuration

The main objective of this post is to provide detailed configuration steps on how to set up SAML Authentication for SharePoint 2013/2016 w...