{"id":18778856,"url":"https://github.com/ramsailopal/powershell","last_synced_at":"2025-07-11T17:43:36.592Z","repository":{"id":127742289,"uuid":"561331848","full_name":"RamSailopal/Powershell","owner":"RamSailopal","description":"Simple Powershell scripts","archived":false,"fork":false,"pushed_at":"2022-11-29T11:43:03.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T05:37:13.558Z","etag":null,"topics":["powershell"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RamSailopal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-11-03T13:16:04.000Z","updated_at":"2022-11-03T14:35:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb928465-e968-4488-9e8b-1d75c5292448","html_url":"https://github.com/RamSailopal/Powershell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RamSailopal/Powershell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2FPowershell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2FPowershell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2FPowershell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2FPowershell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RamSailopal","download_url":"https://codeload.github.com/RamSailopal/Powershell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamSailopal%2FPowershell/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264864134,"owners_count":23675299,"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":["powershell"],"created_at":"2024-11-07T20:17:36.088Z","updated_at":"2025-07-11T17:43:36.564Z","avatar_url":"https://github.com/RamSailopal.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Powershell\n\nSimple Powershell examples\n\n# Adding script to shell as function when Powershell loads (.bashrc/.profile equivalent)\n\n    New-Item $profile -Type File -Force\n    \nNavigate to the location of the created file and then create functions i.e.\n\n    Function grep { \n       \u0026 'C:\\Documents and Settings\\rsailopal\\Documents\\Powershell1\\grep1.ps1' \n    }\n\n# Additional Commands\n\n**List installed software:**\n\n    Get-WMIObject -Class Win32_Product | Select-Object -Property Name\n    \n**Parse logs:**\n\n    Get-Eventlog -List\n    \nGet a list of the log types\n\n    Get-WinEvent -Logname Application -MaxEvents 5\n   \nGet the last 5 application errors\n\n**Remote Connections**\n\n    Enable-PSRemoting -Force\n    \n Enable remote connection to machine\n \n    $hostnme = hostname\n    \n    Invoke-Command -ComputerName $hostnme -ScriptBlock { hostname }\n    \n Execute the command **hostname** on the localhost\n \n    $hostnme = hostname\n    \n    $s = New-PSSession -ComputerName $hostnme\n    \n    Invoke-Command -Session $s { hostname }\n    \n Execute the same command creating a persistent session (variables created remotely are persisted across Invoke-Command calls)\n \n **Environmental Variables**\n \n    Get-ChildItem -Path Env:\n    \n Get environmental variables.\n \n **Memory usage**\n \n    systeminfo | ForEach-Object { If ( $_ -like \"*Memory*\") { Write-Host $_ } }\n    \n **CPU utlisation**\n \n    Get-WmiObject Win32_Processor | Measure-Object -Property LoadPercentage -Average | Select Average\n \n \n    \n \n \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsailopal%2Fpowershell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framsailopal%2Fpowershell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framsailopal%2Fpowershell/lists"}