{"id":16550308,"url":"https://github.com/sylhare/powershell","last_synced_at":"2025-03-04T15:27:23.793Z","repository":{"id":92385352,"uuid":"90471270","full_name":"sylhare/PowerShell","owner":"sylhare","description":"Some PowerShell examples","archived":false,"fork":false,"pushed_at":"2019-05-01T21:34:59.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T20:22:10.237Z","etag":null,"topics":["documentation","powershell","tutorial"],"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/sylhare.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":"2017-05-06T15:09:57.000Z","updated_at":"2024-01-19T15:42:17.000Z","dependencies_parsed_at":"2023-05-17T02:00:13.175Z","dependency_job_id":null,"html_url":"https://github.com/sylhare/PowerShell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylhare%2FPowerShell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylhare%2FPowerShell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylhare%2FPowerShell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sylhare%2FPowerShell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sylhare","download_url":"https://codeload.github.com/sylhare/PowerShell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241871001,"owners_count":20034381,"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":["documentation","powershell","tutorial"],"created_at":"2024-10-11T19:33:48.992Z","updated_at":"2025-03-04T15:27:23.770Z","avatar_url":"https://github.com/sylhare.png","language":"PowerShell","readme":"# PowerShell\n\n## Sources\n\n- [http://powershelltutorial.net/](http://powershelltutorial.net/)\n- [https://www.pdq.com/blog/powershell-how-to-write-your-first-powershell-script/](https://www.pdq.com/blog/powershell-how-to-write-your-first-powershell-script/)\n- [https://technet.microsoft.com/en-us/library/bb963733.aspx](https://technet.microsoft.com/en-us/library/bb963733.aspx)\n- [http://www.computerperformance.co.uk/powershell/powershell_example_basic.htm](http://www.computerperformance.co.uk/powershell/powershell_example_basic.htm)\n\n## Experiment with ISE\n\nTo start developping script you can use the Powershell ISE that is by default installed.\nYou can open it by looking for [Windows PowerShell ISE](https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.core/about/about_powershell_ise_exe) or use cmd to launch any file or the ISE directly:\n\n\tPowerShell_ISE –file \"file1.ps1,file2.ps1\"\n\nHere both files `file1.ps1` and `file2.ps1` will be opened in *Windows PowerShell ISE*.\n\n:warning: If you have trouble running a script, try running:\n\n\tget-help about_signing\n\nYou might not have allowed running powershell script on your computer.\n\n## Introduction\n\nOpen the powerShell (should be a command line screen with a blue background when opened from the windows start up menu). Or you can use cmd and type `start powershell` to launch it.\n\ntype the following command to see the current execution policy on the computer\n    \n    Get-ExecutionPolicy\n    \nFo security reason, you might want to check the policy level required. Unrestricted, Allsigned, RemoteSigned, Restricted.\nLet's set it to Unrestricted to do some tests.\n\n    Set-ExecutionPolicy -ExecutionPolicy Unrestricted\n    \nNow we can run the hello.ps1 script, first let's go to the repository it has been saved, then run it.\n\n    Set-Location 'Documents\\GitHub\\PowerShell\\src'\n    ./Hello\n    \nOne tips if you need to run something that needs your credential multiple times is to save it in a value:\n    \n        $global:Credential = Get-Credential\n        \nThe global keyword makes this value available from anywhere","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylhare%2Fpowershell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsylhare%2Fpowershell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsylhare%2Fpowershell/lists"}