Clear-ImproperProfileCopy
SYNOPSIS
Clears Application Data folder that was improperly copied which happens when copy and pasting a profile.
SYNTAX
Clear-ImproperProfileCopy [-Source] <String> [-Destination] <String>
[-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Copies nested Application Data folders to a higher level (by default to C:\f2) and deletes them.
EXAMPLES
EXAMPLE 1
Clear-ImproperProfileCopy -Source \\fileserver\example\user -Destination E:\f2
Clears nested Application Data folders from \\fileserver\example\user. Uses E:\f2 as the folder for clearing.
EXAMPLE 2
Clear-ImproperProfileCopy E:\temp\Profile E:\f2
Clears nested Application Data folders from E:\temp\Profile. Uses E:\f2 as the folder for clearing.
PARAMETERS
-Source
Specifies the folder that contains the Application Data folder causing issues.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Destination
Specifies the folder that is used to copy the nested folders to and deletes them.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
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
OUTPUTS
System.Object
NOTES
ALIASES
None.
PLATFORM APPLICABILITY
Windows only. The platform-aware loader does not export this command on Linux or macOS.
POWERSHELL COMPATIBILITY
See PowerShell compatibility for the supported runtime policy. PowerShell 7.6 LTS is preferred.
RELATED LINKS
https://docs.keldor.dev/powershell/keldor/Clear-ImproperProfileCopy