Skip to content

Latest commit

 

History

History
173 lines (131 loc) · 4.29 KB

Invoke-DPContentLibraryCleanup.md

File metadata and controls

173 lines (131 loc) · 4.29 KB
external help file Module Name online version schema
PSCMContentMgmt-help.xml
PSCMContentMgmt
2.0.0

Invoke-DPContentLibraryCleanup

SYNOPSIS

Invoke the ContentLibraryCleanup.exe utility against a distribution point.

SYNTAX

Invoke-DPContentLibraryCleanup [-DistributionPoint] <String> [[-ContentLibraryCleanupExe] <String>] [-Delete]
 [[-SiteServer] <String>] [[-SiteCode] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Invoke the ContentLibraryCleanup.exe utility against a distribution point.

This is essentially just a wrapper for the binary.

Worth noting that omitting the -Delete parameter is the equivilant of omitting the "/delete" parameter for the binary too. In other words, without -Delete it will just report on orphaned content and not delete it.

EXAMPLES

EXAMPLE 1

Invoke-DPContentLibraryCleanup.ps1 -DistributionPoint "dp1.contoso.com"

Queries "dp1.contoso.com" for orphaned content. Because of the missing -Delete parameter, data will not be deleted.

EXAMPLE 2

Invoke-DPContentLibraryCleanup.ps1 -DistributionPoint "dp1.contoso.com" -ContentLibraryCleanupExe "C:\Sources\ContentLibraryCleanup.exe" -Delete

Deletes orphaned content on "dp1.contoso.com". Uses binary "C:\Sources\ContentLibraryCleanup.exe".

PARAMETERS

-DistributionPoint

Name of the distribution point (as it appears in Configuration Manager, usually FQDN) you want to clean up.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ContentLibraryCleanupExe

Absolute path to ContentLibraryCleanup.exe.

The function attempts to discover the location of this exe, however if it is unable to find it you will receive a terminating error and asked to use this parameter.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Delete

Deletes orphaned content.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-SiteServer

FQDN address of the site server (SMS Provider).

You only need to use this parameter once for any function of PSCMContentMgmt that also has a -SiteServer parameter. PSCMContentMgmt remembers the site server for subsequent commands, unless you specify the parameter again to change site server.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SiteCode

Site code of which the server specified by -SiteServer belongs to.

You only need to use this parameter once for any function of PSCMContentMgmt that also has a -SiteCode parameter. PSCMContentMgmt remembers the site code for subsequent commands, unless you specify the parameter again to change site code.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

This function does not accept pipeline input.

OUTPUTS

System.Array of System.String

NOTES

RELATED LINKS