< Back

Clear-AxClientCacheObjects

Sat Jan 11, 2020 8:07 am

NAME Clear-AxClientCacheObjects



SYNOPSIS

Clear AX 2012 Client Cache Objects





SYNTAX

Clear-AxClientCacheObjects [[-ObjectType] <String[]>] [[-UserLocation] <String>] [-ListOnly] [<CommonParameters>]





DESCRIPTION

Remove AX 2012 Client Cache Object files from the file system





PARAMETERS

-ObjectType <String[]>

The type of cache object that you want to remove



Valid options are:

AUC

KTI

VSAssemblies



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UserLocation <String>

Decide which user location that you want to work against



Do you want to remove the cache objects from the current user or all users?



Valid options are:

CurrentUser

AllUsers



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ListOnly [<SwitchParameter>]

Instruct the cmdlet to only list the files that matches your selection from the other parameters



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Tags: Client Cache, Cache, KTI, AUC, VSAssemblies



Author: M??????tz Jensen (@Splaxi)



All credits goes to Kenneth Madsen (@KennethGrupp) for providing detailed examples on how to achieve this the

best way using powershell



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Clear-AxClientCacheObjects -ObjectType "Auc" -UserLocation "CurrentUser" -ListOnly



This will list all the Auc files under the current user location.

It will work against the ObjectType "Auc".

It will work againt the UserLocation "CurrentUser".

It will only list the files and folders, it will NOT delete anything.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Clear-AxClientCacheObjects -ObjectType "Auc" -UserLocation "CurrentUser"



This will delete all the Auc files under the current user location.

It will work against the ObjectType "Auc".

It will work againt the UserLocation "CurrentUser".



It WILL delete the files without further warning or notification!









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Clear-AxClientCacheObjects -ObjectType "Auc" -UserLocation "AllUsers"



This will delete all the Auc files under all users locations.

It will work against the ObjectType "Auc".

It will work againt the UserLocation "AllUsers".



It WILL delete the files without further warning or notification!









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Clear-AxClientCacheObjects -ObjectType "Auc","Kti","VSAssemblies" -UserLocation "CurrentUser"



This will delete all the Auc,Kti and VSAssemblies files under the current user location.

It will work against the ObjectType "Auc","Kti","VSAssemblies".

It will work againt the UserLocation "CurrentUser".



It WILL delete the files without further warning or notification!











RELATED LINKS