This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding="utf-8" | |
import="com.tridion.ambientdata.*, | |
com.tridion.ambientdata.claimstore.*, | |
java.net.*, | |
java.util.*, | |
java.util.Map.Entry, | |
net.minidev.json.JSONObject"%> | |
<%! | |
public String serializeClaimStore() { | |
ClaimStore store = AmbientDataContext.getCurrentClaimStore(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# December 2017: the switches "-ConnectionType Basic-SSL -CredentialType Basic" are new in the develop branch of the Tridion PowerShell modules | |
# install the develop version with iwr "https://raw.githubusercontent.com/pkjaer/tridion-powershell-modules/develop/CoreService/Installation/Install.ps1" | iex | |
$username = 'domain\user' | |
$password = 'password' | ConvertTo-SecureString -asPlainText -Force | |
$credential = New-Object System.Management.Automation.PSCredential($username, $password) | |
Set-TridionCoreServiceSettings -HostName cm-web-gocompare-test.tridion.sdlproducts.com -ConnectionType Basic-SSL -CredentialType Basic -Credential $credential | |
Get-TridionUser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check remaining rearm count | |
slmgr.vbs /dlv | |
# rearm the machine | |
slmgr.vbs /rearm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module Tridion-CoreService | |
$client = Get-TridionCoreServiceClient | |
($client.GetApplicationIds()).count | |
$client.GetApplicationIds() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$username = 'username' | |
$password = 'password' | ConvertTo-SecureString -asPlainText -Force | |
$credential = New-Object System.Management.Automation.PSCredential($username, $password) | |
Set-TridionCoreServiceSettings -Credential $credential -Hostname "localhost" -Version Web-8.5 -Persist | |
Get-TridionUser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ErrorActionPreference = "Stop" | |
$subject = "/webdav/400 Example Site/Home/000 Home.tpg" | |
#$subject = "/webdav/400 Example Site/Home/_Navigation.tpg" | |
#$subject = "/webdav/400 Example Site/Home" | |
# if you do not have the Tridion-CoreService module yet: get it from https://github.com/pkjaer/tridion-powershell-modules | |
Import-Module Tridion-CoreService -Verbose:$false | |
# Set up a Tridion Core Service client for the Content Manager server cms.server.com. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using Test-Path instead of Get-PSDrive and trying to map the drive without and then with credentials makes sure the script works in all circumstances: | |
# also when the drive was already mapped in Windows Explorer or in a PowerShell remoting session | |
# We map the drive with -Perist to make sure the drive is mapped in the Windows file explorer as well. Without -Persist the drive is only available in PowerShell. | |
# The -Scope Global parameter is used to make sure the drive is available outside of this script as well | |
$sharePath = "\\server\share\optional-path" | |
$mapDrive = "Z" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Environment]::SetEnvironmentVariable("TRIDION_CM_ENVIRONMENT_ID", "Development", "Machine") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invoke-Command -ComputerName @("server1", "server2") -ScriptBlock { | |
Invoke-Expression "iisreset" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jre-8u144-windows-x64.exe AUTO_UPDATE=Disable REBOOT=Disable INSTALL_SILENT=Enable |