{"id":25736874,"url":"https://github.com/powershell-brazil/powershell-utils","last_synced_at":"2026-02-15T17:05:29.663Z","repository":{"id":134794405,"uuid":"412477002","full_name":"powershell-brazil/powershell-utils","owner":"powershell-brazil","description":"⌨️ Some utility scripts, modules, and commands for PowerShell (Windows, Linux, and MacOS) to make everyday tasks easier","archived":false,"fork":false,"pushed_at":"2024-11-27T16:37:44.000Z","size":82,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T01:15:11.507Z","etag":null,"topics":["linux","macos","powershell","powershell-core","scripts","windows","windows-powershell"],"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/powershell-brazil.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":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-01T13:27:40.000Z","updated_at":"2025-02-23T18:38:57.000Z","dependencies_parsed_at":"2024-11-27T17:37:14.499Z","dependency_job_id":null,"html_url":"https://github.com/powershell-brazil/powershell-utils","commit_stats":{"total_commits":67,"total_committers":1,"mean_commits":67.0,"dds":0.0,"last_synced_commit":"6703e52bd4dd780729b89d08f75cd020d7ecf0bb"},"previous_names":["powershell-brazil/powershell-utils"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powershell-brazil%2Fpowershell-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powershell-brazil%2Fpowershell-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powershell-brazil%2Fpowershell-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powershell-brazil%2Fpowershell-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/powershell-brazil","download_url":"https://codeload.github.com/powershell-brazil/powershell-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252978784,"owners_count":21834917,"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","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":["linux","macos","powershell","powershell-core","scripts","windows","windows-powershell"],"created_at":"2025-02-26T06:22:43.439Z","updated_at":"2026-02-15T17:05:24.640Z","avatar_url":"https://github.com/powershell-brazil.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Powershell Utilities \n[![Unit tests](https://github.com/pferreirafabricio/powershell-utils/actions/workflows/tests.yml/badge.svg)](https://github.com/pferreirafabricio/powershell-utils/actions/workflows/tests.yml)\n[![Linting](https://github.com/pferreirafabricio/powershell-utils/actions/workflows/linting.yml/badge.svg)](https://github.com/pferreirafabricio/powershell-utils/actions/workflows/linting.yml)\n\n## Adding it to the PowerShell profile\n\nYou can add these scripts to your PowerShell profile to make them easier for use.\n\n\u003e [!NOTE]\n\u003e Note that for PowerShell Core and PowerShell Windows, there are different profile files\n\nExample:\n\n```powershell\n# open the configuration file for your PowerShell\n\n\u003e code $profile\n```\n\n```powershell\n# inside Microsoft.Powershell_profile.ps1 file\n\nfunction RunWhere($command) {\n    (Get-Command $command).Path\n}\n\nSet-Alias -Name \"whereis\" -Value RunWhere\n```\n\n\u003e [!NOTE]\n\u003e To learn more about how you can configure your powershell profiles, take a look at [about_Profiles](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.4)\n\n\n\n## 🐍 Scripts\n- [Time.ps1](./Time.ps1) - Short function that works like time on Unix \u003cbr/\u003e\n```powershell\n# Example: \n\u003e ./Time.ps1 # execute the script\n\u003e time dotnet run # use the function to measure the time of a certain command\n```\n- [RemoveFileInFolder.ps1](./RemoveFileInFolder.ps1) - Loop through folders and remove a file\n\n- [RenameFilesInFolder.ps1](./RenameFilesInFolder.ps1) - Loop through a folder and rename files by creation time\n\n- [CreateTask.ps1](./CreateTask.ps1) - Create a system task on Windows\n\n- [backup-mongo-db](https://github.com/pferreirafabricio/backup-mongo-db) - Make a backup of a MongoDB database\n\n- [WhereIs.ps1](./WhereIs.ps1) - Find the path of the executable\n```powershell\n# Example: \n\u003e ./WhereIs.ps1 # Execute the script\n\u003e whereis php\nC:\\tools\\php74\\php.exe\n```\n\n- [GetStringBetweenByIndex.ps1](./GetStringBetweenByIndex.ps1) - Return a string inside a start and final index\n```powershell\n# Example: \n\u003e ./GetStringBetweenByIndex.ps1 -Value \"Hello World\" -Start \"He\" -End \"ld\"\nello Wor\n``` \n\n- [ConvertGitLogToJson.ps1](./ConvertGitLogToJson.ps1) - Convert the output of git log command in JSON\n```powershell\n# Example: \n\u003e ./ConvertGitLogToJson.ps1 -NumberOfCommits 1\n[\n  {\n    \"commit\": \"f9f320eeea4c4329896a785f083c04279526064f\",\n    \"tree\": \"4841da995b423e1d748ccfd908976070e435f254\",  \n    \"parent\": \"f78937b304446b504a0ad9ea101d995193431528\",\n    \"refs\": \"HEAD -\u003e main, origin/main, origin/HEAD\",    \n    \"subject\": \"Update README.md\",\n    \"body\": \"\",\n    \"author\": \"Fabrício Pinto Ferreira\",\n    \"commiter\": \"GitHub\"\n  }\n]\n``` \n\n- [GetIfStringIsInArray.ps1](./GetIfStringIsInArray.ps1) - Verify if the string contains any other strings present in the array\n```powershell\n# Example: \n\u003e ./GetIfStringIsInArray.ps1 -ArraySet @('work', 'paper') -StringToVerify \"I work in a paper company\"\nTrue\n``` \n\n- [RunApiAndSiteInWT.ps1](./RunApiAndSiteInWT.ps1) - Run an API and Site in a tab of Windows Terminal\n\n- [StartDotnetApi.ps1](./StartDotnetApi.ps1) - Run a Dotnet API\n\n- [StartWebpackSite.ps1](./StartWebpackSite.ps1) - Run a Webpack project (like Vue or React)\n\n- [BuildDotnet.ps1](./BuildDotnet.ps1) - Build a Dotnet API\n\n- [BuildWebpackSite.ps1](./BuildWebpackSite.ps1) - Build a Webpack project (like Vue or React)\n\n- [RemoveMergedBranches.ps1](./RemoveMergedBranches.ps1) - Remove all merged branches in a git repository (this script only removes merged branches and does not use the -D flag)\n\n- [PreviousCommands.ps1](./PreviousCommands.ps1) - Returns a list of the previous commands (by default it'll return the last 20 commands)\n\n## 🎹 Commands\n\n- [SetClipboardWithPath.ps1](./SetClipboardWithPath.ps1) - Short version to get the current path into your clipboard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowershell-brazil%2Fpowershell-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpowershell-brazil%2Fpowershell-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowershell-brazil%2Fpowershell-utils/lists"}