< Back

Clear-AxServerCacheObjects

Sat Jan 11, 2020 8:07 am

NAME Clear-AxServerCacheObjects



SYNOPSIS

Clear AX 2012 AOS Server Cache Objects





SYNTAX

Clear-AxServerCacheObjects [[-ObjectType] <String[]>] [[-InstanceName] <String>] [-ListOnly] [<CommonParameters>]





DESCRIPTION

Remove AX 2012 AOS Server Cache Object files from the file system





PARAMETERS

-ObjectType <String[]>

The type of cache object that you want to remove



Valid options are:

XppIL

Label

VSAssemblies



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-InstanceName <String>

Name of the instance that you are working against



Default value can be configured with the Set-AxActiveAosConfig cmdlet



Required? false

Position? 2

Default value $Script:ActiveAosInstancename

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, Label, XppIL, 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-AxServerCacheObjects -ObjectType "XppIL" -InstanceName "AXTEST" -ListOnly



This will list all the XppIL files under the AXTEST AOS Instance location.

It will work against the ObjectType "XppIL".

It will work againt the InstanceName "AXTEST".

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









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



PS C:\\>Clear-AxServerCacheObjects -ObjectType "XppIL" -InstanceName "AXTEST"



This will delete all the XppIL files under the AXTEST AOS Instance location.

It will work against the ObjectType "XppIL".

It will work againt the InstanceName "AXTEST".



It WILL delete the files without further warning or notification!









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



PS C:\\>Clear-AxServerCacheObjects -ObjectType "XppIL","Label","VSAssemblies" -InstanceName "AXTEST"



This will delete all the XppIL,Label and VSAssemblies files under the AXTEST AOS Instance location.

It will work against the ObjectType "XppIL","Label","VSAssemblies".

It will work againt the InstanceName "AXTEST".



It WILL delete the files without further warning or notification!











RELATED LINKS