{"id":15064099,"url":"https://github.com/samerde/write-this","last_synced_at":"2026-02-14T16:07:17.357Z","repository":{"id":251617202,"uuid":"837926788","full_name":"SamErde/Write-This","owner":"SamErde","description":"A little function to help write output to the console and log files at the same time to keep your actual code cleaner.","archived":false,"fork":false,"pushed_at":"2024-10-07T13:45:30.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T21:24:32.408Z","etag":null,"topics":["powershell","utilities","utility-function"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamErde.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-04T13:10:24.000Z","updated_at":"2025-05-15T23:55:50.000Z","dependencies_parsed_at":"2024-10-13T00:01:40.229Z","dependency_job_id":"aaed45d3-8423-4d36-803c-b6586ed7d69e","html_url":"https://github.com/SamErde/Write-This","commit_stats":null,"previous_names":["samerde/write-this"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SamErde/Write-This","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamErde%2FWrite-This","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamErde%2FWrite-This/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamErde%2FWrite-This/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamErde%2FWrite-This/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamErde","download_url":"https://codeload.github.com/SamErde/Write-This/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamErde%2FWrite-This/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275225879,"owners_count":25427009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["powershell","utilities","utility-function"],"created_at":"2024-09-25T00:11:28.193Z","updated_at":"2026-02-14T16:07:17.296Z","avatar_url":"https://github.com/SamErde.png","language":"PowerShell","readme":"# Write-This\n\n\u003c!-- badges-start --\u003e\n[![GitHub stars](https://img.shields.io/github/stars/samerde/Write-This?cacheSeconds=3600)](https://github.com/samerde/Write-This/stargazers/)\n[![GitHub contributors](https://img.shields.io/github/contributors/samerde/Write-This.svg)](https://github.com/samerde/Write-This/graphs/contributors/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n![GitHub top language](https://img.shields.io/github/languages/top/SamErde/Write-This)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ae92f0d929de494690e712b68fb3b52c)](https://app.codacy.com/gh/SamErde/Write-This/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n\u003c!-- badges-end --\u003e\n\n## Synopsis\n\nWrite a message to the console and a log file at the same time.\n\n## Description\n\nA little function to help write output to the console and log files at the same time to keep your actual code cleaner. Instead of having separate lines for interactive output and log files, one function can handle both.\n\n## Example\n\nUntil this is an actual module, the following example shows how to manually import the three scripts and use them:\n\n```powershell\n. .\\Start-WriteThis.ps1\n. .\\Write-This.ps1\n. .\\Stop-WriteThis.ps1\n\nStart-WriteThis -LogFile \"TestLog\"\n\nWrite-This -LogText \"First!\" -Output Both -ForegroundColor White -BackgroundColor DarkBlue\n$Directories = Get-ChildItem -Directory $env:TEMP\n$DirectoryCount = $Directories.Count\nWrite-This -LogText \"Found $DirectoryCount directories in the current folder.\" -Output Both\nWrite-This -LogText \"These details are only going into the log file:`n$Directories\" -Output LogOnly\nWrite-This -LogText \"Let's finish this up.\" -ForegroundColor Green -BackgroundColor Black\n\nStop-WriteThis -LogFile $script:LogFile\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamerde%2Fwrite-this","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamerde%2Fwrite-this","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamerde%2Fwrite-this/lists"}