Set document library to unsearchable in workflow

Is there any action/ way to set new document library/list to unsearchable in workflow?? because i does not want the new document library/ list to appear in the search result.

other information:
i’m using the sharepoint designer 2013.
Thanks.

Hello,

Yes, you need to switch on NoCrawl flag for the list/document library. To do this you can use the following PowerShell Script.

$web = Get-SPWeb "http://yoursite/sites/Dev/"
$list = $web.Lists["Documents"]
$list.NoCrawl = $true
$list.Update()

[quote=“Roman Rylov”]Hello,

Yes, you need to switch on NoCrawl flag for the list/document library. To do this you can use the following PowerShell Script.

$web = Get-SPWeb "http://yoursite/sites/Dev/" $list = $web.Lists["Documents"] $list.NoCrawl = $true $list.Update() [/quote]

Hello Roman, Sorry that I did mention my problem well. I have update my question. Hope you can help. Thank you.

Unfortunately, using workflow you cannot do this.
Could you please describe your business case? Why do you need to do this exactly from a workflow?