Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions tools/CSSTools/1.2026.2.19/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This article describes the contents of the Microsoft.AzLocal.CSSTools 1.2602.19.## module changes. This update includes improvements and fixes for the latest release of Microsoft.AzLocal.CSSTools that is supported to run on Azure Local deployments.

# Download the update
You can download the latest version of Microsoft.AzLocal.CSSTools by running `Update-Module -Name Microsoft.AzLocal.CSSTools` on each of the Azure Local cluster nodes. After you have downloaded the module, ensure you remove the current version from runspace by using `Remove-Module` and import the latest version using `Import-Module`.

```powershell
# update the current module directly from PowerShell Gallery
Update-Module -Name Microsoft.AzLocal.CSSTools

# remove the current version from the runspace in case it was already imported prior to update
Remove-Module -Name Microsoft.AzLocal.CSSTools

# load the latest version into the runspace
Import-Module -Name Microsoft.AzLocal.CSSTools
```

# What's new


# Known Issues


# Contact Us
If you are encountering an issue, or need assistance, refer to [questions-or-feedback](https://learn.microsoft.com/en-us/azure/azure-local/manage/support-tools#questions-or-feedback).
153 changes: 153 additions & 0 deletions tools/CSSTools/1.2026.2.19/functions/Clear-AzsSupportDirectory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Clear-AzsSupportDirectory

## SYNOPSIS
Clears the contents of the directory

## SYNTAX

### Local (Default)
```
Clear-AzsSupportDirectory [-Path <String[]>] [-Recurse] [-Force] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

### Remote
```
Clear-AzsSupportDirectory [-ComputerName <String[]>] [-Credential <PSCredential>] [-Path <String[]>] [-Recurse]
[-Force] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION
This function is used to clear the contents of a directory, either locally or remotely.
It includes safety checks to ensure that only allowed directories are cleared and that certain files are excluded from deletion.
When run remotely, it uses PowerShell remoting to execute the cleanup on the target machines.

## EXAMPLES

### EXAMPLE 1
```
Clear-AzsSupportDirectory
```

### EXAMPLE 2
```
Clear-AzsSupportDirectory -ComputerName PREFIX-NC01 -Path 'C:\Temp\Azs.Support'
```

### EXAMPLE 3
```
Clear-AzsSupportDirectory -ComputerName PREFIX-NC01,PREFIX-SLB01 -Credential (Get-Credential)
```

### EXAMPLE 4
```
Clear-AzsSupportDirectory -Force -Recurse
```

### EXAMPLE 5
```
Clear-AzsSupportDirectory -Path 'C:\Temp\Azs.Support\Path1','C:\Temp\Azs.Support\Path2' -Force -Recurse
```

## PARAMETERS

### -ComputerName
Type the NetBIOS name, an IP address, or a fully qualified domain name of one or more remote computers.

```yaml
Type: String[]
Parameter Sets: Remote
Aliases:

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

### -Credential
Specifies a user account that has permission to perform this action.
The default is the current user.
Type a user name, such as User01 or Domain01\User01, or enter a PSCredential object generated by the Get-Credential cmdlet.
If you type a user name, you're prompted to enter the password.

```yaml
Type: PSCredential
Parameter Sets: Remote
Aliases:

Required: False
Position: Named
Default value: [System.Management.Automation.PSCredential]::Empty
Accept pipeline input: False
Accept wildcard characters: False
```

### -Path
Specifies a path of the items being removed.
Wildcard characters are permitted.
If ommitted, defaults to (Get-WorkingDirectory).

```yaml
Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: "$(Get-WorkingDirectory)\*"
Accept pipeline input: False
Accept wildcard characters: False
```

### -Recurse
Indicates that this cmdlet deletes the items in the specified locations and in all child items of the locations.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

### -Force
Forces the cmdlet to remove items that cannot otherwise be changed, such as hidden or read-only files or read-only aliases or variables.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

### -ProgressAction

```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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](http://go.microsoft.com/fwlink/?LinkID=113216).

## OUTPUTS

### Returns nothing. This function performs a cleanup operation and does not produce output.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Clear-AzsSupportParentWorkingDirectory

## SYNOPSIS
Clears stale Azs.Support working directory contents across all infrastructure nodes.

## SYNTAX

```
Clear-AzsSupportParentWorkingDirectory [[-LastWriteTime] <DateTime>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
```

## DESCRIPTION
This function iterates through the parent working directory of Azs.Support and removes any directories
that are older than the specified LastWriteTime, except for the current working directory.

## EXAMPLES

### EXAMPLE 1
```
Clear-AzsSupportParentWorkingDirectory -LastWriteTime (Get-Date).AddDays(-10)
```

## PARAMETERS

### -LastWriteTime
Optional parameter to define the age of folders to retain within the parent working directory.
Defaults to (Get-Date).AddDays(-5)

```yaml
Type: DateTime
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: (Get-Date).AddDays(-5)
Accept pipeline input: False
Accept wildcard characters: False
```

### -ProgressAction

```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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](http://go.microsoft.com/fwlink/?LinkID=113216).

## OUTPUTS

### Returns nothing. This function performs a cleanup operation and does not produce output.
105 changes: 105 additions & 0 deletions tools/CSSTools/1.2026.2.19/functions/Compress-AzsSupportArchive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Compress-AzsSupportArchive

## SYNOPSIS
Creates a zip archive that contains the files and directories from the specified directory

## SYNTAX

```
Compress-AzsSupportArchive [-Path] <DirectoryInfo> [[-Destination] <FileInfo>] [[-CompressionLevel] <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## DESCRIPTION
Creates a zip archive using the System.IO.Compression namespace that contains the files and directories from the specified directory.
This is used to compress the collected data into an archive that can be easily shared for support purposes and enables compression of files up to 8GB in size.

## EXAMPLES

### EXAMPLE 1
```
Compress-AzsSupportArchive -Path C:\Example\Logs -Destination "$(Get-AzsSupportWorkingDirectory)\Logs.zip"
```

### EXAMPLE 2
```
Compress-AzsSupportArchive -Path C:\Example\Logs -Destination "$(Get-AzsSupportWorkingDirectory)\Logs.zip" -CompressionLevel Optimal
```

## PARAMETERS

### -Path
Specifies the path to the directory that you wish to compress.
All files and subfolders in a directory are added to your archive file by default.

```yaml
Type: DirectoryInfo
Parameter Sets: (All)
Aliases:

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

### -Destination
Specifies the output location of the archive directory.
Path defined should contain the absolute path including the .zip extension.
If this parameter is not specified, the archive will be created in the working directory.

```yaml
Type: FileInfo
Parameter Sets: (All)
Aliases:

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

### -CompressionLevel
Specifies how much compression to apply when you're creating the archive file.
Faster compression requires less time to create the file, but can result in larger file sizes.
If this parameter isn't specified, the command uses the default value, Optimal.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

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

### -ProgressAction

```yaml
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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](http://go.microsoft.com/fwlink/?LinkID=113216).

## OUTPUTS

### System.IO.FileInfo
### Returns a FileInfo object representing the created zip archive file.
### PS> Compress-AzsSupportArchive -Path C:\Example\Logs -Destination "$(Get-AzsSupportWorkingDirectory)\Logs.zip"
### Mode LastWriteTime Length Name
### ---- ------------- ------ ----
### -a--- 02/18/2026 9:30 PM 104857600 contoso-n01_Logs.zip
Loading