Skip to content

Instantly share code, notes, and snippets.

View ddemeyer's full-sized avatar

ddemeyer

  • RWS
  • Belgium
View GitHub Profile
@ddemeyer
ddemeyer / Export-SonarQubeProject.ps1
Last active August 28, 2023 08:13
Exporting from SonarQube to a CSV file (hence Excel XLSX file) for several projects, defaulted to the authenticated user's Favorites. Last run with success on 7.6.0.21501
Function Export-SonarQubeProject {
<#
.DESCRIPTION
Export projects from SonarQube into a .CSV (hence after Excel .XSLX file)
Script takes care of retrieving up to 10000 hits iteratively for your search criteria. And will warn if you have over 10000 hits which is SonarQube's limitation.
You can adapt the default parameters below for easy usage. In the 'Process' section there are parameters for more or less filtering on SonarQube projects.
.EXAMPLE
Export by user's favorites. Make sure you run this .PS1 file so it is loaded into your session.
@ddemeyer
ddemeyer / Add-FirstEditorTemplate.ps1
Last active August 2, 2018 12:49
Starting from Tridion Docs 13SP1 you always need an existing Editor Template to be able to create content objects like Topics, Images, Maps, and Other. Typically they are there, the Other might be an issue. The below snippet gets you going of adding the first/initial one using the API through ISHRemote.
$ishSession = New-IshSession -WsBaseUrl "https://example.com/ISHWS/" -PSCredential "Admin"
# Manually create a folder of type 'Other' and provide it as FolderPath parameter
$otherIshFolder = Get-IshFolder -IshSession $ishSession -FolderPath "\System Management\Editor Templates\Other\" # Please verify
# Below code creates an empty text file and creates your initial Other content object
Set-Content -Path "$env:TEMP\empty.txt" -Value "Empty Text File, or not" -Force
$metadata = Set-IshMetadataField -IshSession $ishSession -Level Logical -Name FTITLE -Value "Empty Template" |
Set-IshMetadataField -IshSession $ishSession -Name "FAUTHOR" -Level Lng -ValueType Element -Value VUSERADMIN |
Set-IshMetadataField -IshSession $ishSession -Name "FSTATUS" -Level Lng -ValueType Element -Value VSTATUSDRAFT
Add-IshDocumentObj -IshSession $ishSession -IshFolder $otherIshFolder -IshType ISHTemplate -LogicalId ISHEDITORTEMPLATETXT -Metadata $metadata -Lng en -Edt "EDT-TEXT" -FilePath "$env:TEMP\empty.txt
@ddemeyer
ddemeyer / Prepare-ProjectCorner.ps1
Last active March 31, 2017 16:19
ISHRemote code samples on doing an Administrator's Upgrade, creating a project based UserGroup with a folder structure on Knowledge Center Content Manager (= LiveContent Architect = Trisoft InfoShare)
#
# SDL Belgium/ddemeyer
# 20170329
#
# POWERSHELL REMARK #1...
# If you get "...cannot be loaded because the execution of scripts is disabled on this system."
# Then you are running Restricted, so then execute as an Administrator
# Set-ExecutionPolicy unrestricted
# POWERSHELL REMARK #2...
# If you can't load the editor 'ise' and get a "Cannot resolve alias 'ise'..." message.
@ddemeyer
ddemeyer / ISHServiceDatabaseDiskUsage.SqlServer.sql
Last active October 16, 2019 15:20
What is using storage in my Microsoft SQLServer-based database of Tridion Docs Content Manager (= Knowledge Center Content Manager = LiveContent Architect = Trisoft InfoShare). In all cases make sure your database jobs are running successfully to keep BackgroundTaskService and EventMonitorService under control. Remember that a big consumer is ke…
-- 20191016/ddemeyer
-- Not a set of beautiful queries but it at all works on all Microsoft SQLServer-based
-- databases of Tridion Docs Content Manager (= Knowledge Center Content
-- Manager = LiveContent Architect = Trisoft InfoShare).
--
-- Note...
-- In all cases make sure your database jobs are running successfully to keep
-- BackgroundTaskService and EventMonitorService under control. Remember that a big consumer
-- is keep revisions around.
-- Last tested on 14/14.0.0
@ddemeyer
ddemeyer / Sync-ADwithInfoShareUser.ps1
Last active February 17, 2017 10:19
Synchronize - so add/disable/delete/alter-rights - on InfoShare user profiles with a group of Active Directory users. This maintains the necessary Knowledge Center Content Manager (= LiveContent Architect = Trisoft InfoShare) user profiles for usage with (indirect) Windows Authentication.
# 20170217/ddemeyer
#
# SUMMARY
# Synchronize - so add/disable/delete/alter-rights - on InfoShare user profiles with a group of Active Directory users.
# This maintains the necessary Knowledge Center Content Manager (= LiveContent Architect = Trisoft InfoShare) user profiles for
# usage with (indirect) Windows Authentication.
#
# REFERENCES
# http://docs.sdl.com/LiveContent/content/en-US/SDL%20Knowledge%20Center%20full%20documentation-v2.1.3/GUID-ACA60551-D607-4861-9E34-0324178B40FF
# https://github.com/sdl/ISHRemote