Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove versions of maps and topics in repo #103

Closed
annjensen opened this issue Oct 7, 2020 · 1 comment
Closed

How to remove versions of maps and topics in repo #103

annjensen opened this issue Oct 7, 2020 · 1 comment
Labels

Comments

@annjensen
Copy link

Hi,
I am new to Tridion Docs and Powershell and have just discovered your PowerShell module. I would like to use it to clean out a folder on our Tridion Docs server which I am using for testing. I can create a script to remove all the folder contents using Get-IshFolder -FolderPath $folderRoot -Recurse | Get-IshFolderContent | Remove-IshDocumentObj -Force
and to remove all the folders using
Remove-IshFolder -FolderPath '\Publications\*'
but I don't know how to first remove any versions of maps and topics that might exist.
Can you advise which cmdlet(s) I can use to achieve this?
Any advice appreciated,
Regards,
Ann

@ddemeyer
Copy link
Contributor

ddemeyer commented Oct 8, 2020

I'll cross post the answer I gave on https://community.sdl.com/developers-more/developers/tridiondocs-developers/f/livecontent_developer_forum/31449/how-to-remove-document-versions-for-publications-maps-and-topics-using-ishremote

Hi Ann,
It seems you are on the right track, probably the clue is in "what stops the deletion of that map/topic"?

Important is that you are deleting/removing from a Repository (not a file system), so besides security and workflow there are quite some business logic rules to make sure that the system offers integrity.

Please have a look at https://github.com/sdl/ISHRemote/blob/master/Source/ISHRemote/Trisoft.ISHRemote/Cmdlets/PublicationOutput/AddIshPublicationOutput.Tests.ps1 which is a Pester-based integration test on top of the ISHRemote PowerShell module. At the bottom in the finally clause you see that the tests removes all of the artifacts it created higher up in the test.

Hope this helps,
Dave

@ddemeyer ddemeyer closed this as completed Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants