Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Set-SitecoreConfiguration {
- [CmdletBinding()]
- param(
- [Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true)]
- [ValidateNotNullOrEmpty()]
- [string]$SitecoreHost,
- [Parameter(Position=1, Mandatory=$true, ValueFromPipeline=$true)]
- [ValidateNotNullOrEmpty()]
- [string]$User,
- [Parameter(Position=2, Mandatory=$true, ValueFromPipeline=$true)]
- [ValidateNotNullOrEmpty()]
- [string]$Password
- )
- $URI = $SitecoreHost + "/sitecore%20modules/PowerShell/Services/RemoteAutomation.asmx";
- $GLOBAL:SpeRemoteProxy = New-WebServiceProxy -Uri $URI
- $GLOBAL:SpeRemoteUser = $User;
- $GLOBAL:SpeRemotePassword = $Password;
- }
- #Connect to SiteCore utilizing function above
- Set-SitecoreConfiguration –SitecoreHost 'http://sitecorehostname' -User 'Admin' –Password 'b'
- <sitecore>
- <powershell>
- <services>
- <restfulv1 enabled="true" />
- <restfulv2 enabled="true" />
- <remoting enabled="true" />
- <fileDownload enabled="true" />
- <fileUpload enabled="true" />
- <mediaDownload enabled="true" />
- <mediaUpload enabled="true" />
- <handleDownload enabled="true " />
- <client enabled="true" />
- <execution enabled="true" />
- </services>
- </powershell>
- </sitecore>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement