### Install community.windows collection via CLI Source: https://github.com/ansible-collections/community.windows/blob/main/README.md Use the ansible-galaxy command to install the collection directly from the command line. ```bash ansible-galaxy collection install community.windows ``` -------------------------------- ### Example of mixed line endings content Source: https://github.com/ansible-collections/community.windows/blob/main/tests/integration/targets/win_lineinfile/files/expectations/99_README.md Representation of the expected content for 30_linebreaks_checksum_bad.txt containing specific carriage return and line feed characters. ```text c:\return\newCRLF c:CR eturnLF ew ``` -------------------------------- ### Define community.windows in requirements.yml Source: https://github.com/ansible-collections/community.windows/blob/main/README.md Include the collection in a requirements.yml file to manage dependencies declaratively. ```yaml collections: - name: community.windows ``` -------------------------------- ### Run collection tests with ansible-test Source: https://github.com/ansible-collections/community.windows/blob/main/README.md Execute sanity and integration tests using the ansible-test tool with Docker support. ```bash ansible-test sanity --docker ansible-test windows-integration --docker ``` -------------------------------- ### Calculate file checksums with PowerShell Source: https://github.com/ansible-collections/community.windows/blob/main/tests/integration/targets/win_lineinfile/files/expectations/99_README.md Use this script to generate checksums for files in the current directory, mimicking win_stat behavior. ```powershell Get-ChildItem | ForEach-Object { $fp = [System.IO.File]::Open("$pwd/$($_.Name)", [System.IO.Filemode]::Open, [System.IO.FileAccess]::Read, [System.IO.FileShare]::ReadWrite) Write-Output $_.Name try { [System.BitConverter]::ToString($sp.ComputeHash($fp)).Replace("-", "").ToLower() } finally { $fp.Dispose() } Write-Output "" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.