{"id":18445640,"url":"https://github.com/voronenko/winfiles","last_synced_at":"2026-02-27T19:48:56.906Z","repository":{"id":145345897,"uuid":"92648858","full_name":"Voronenko/winfiles","owner":"Voronenko","description":"portable configuration files for windows environment","archived":false,"fork":false,"pushed_at":"2021-06-25T15:47:24.000Z","size":479,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-25T12:51:25.591Z","etag":null,"topics":["powershell","windows-10","winfiles"],"latest_commit_sha":null,"homepage":null,"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/Voronenko.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":"2017-05-28T08:21:07.000Z","updated_at":"2021-06-25T15:47:27.000Z","dependencies_parsed_at":"2024-04-19T08:15:50.981Z","dependency_job_id":null,"html_url":"https://github.com/Voronenko/winfiles","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Voronenko/winfiles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fwinfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fwinfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fwinfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fwinfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Voronenko","download_url":"https://codeload.github.com/Voronenko/winfiles/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fwinfiles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29911347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"ssl_error","status_checked_at":"2026-02-27T19:37:41.463Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","windows-10","winfiles"],"created_at":"2024-11-06T07:06:40.439Z","updated_at":"2026-02-27T19:48:56.870Z","avatar_url":"https://github.com/Voronenko.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"winfiles\n========\n\nMy windows environment. Multi-phase install with optional steps.\nIt is recommended to install under admin powershell\n(in other case will activate admin mode, but via subprocess launch in popup)\n\nSo, to recap,\n\n## If it is remote box, but you have initial ps shell\n\n```ps\n[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nSet-ExecutionPolicy Bypass -Scope Process -Force;\niex ((New-Object System.Net.WebClient).DownloadString('https://bit.ly/winfiles'))\n\n```\n\n`https://bit.ly/winfiles` -\u003e `https://raw.githubusercontent.com/Voronenko/winfiles/master/bootstrap.ps1`\n\nThen proceed usually or unusually using cloned repo in `c:\\batch\\winfiles`\n\n\n## Some facts on your box\n\nInstalled powershell version\n\n```ps\n$PSVersionTable.PSVersion\n````\n\nGet box network addresses\n\n```ps\n\n(Get-NetIPAddress).IPAddress\n\n```\n\n## init.ps1\n\nthe `./init.ps1` script will:\n\n* Back up any existing winfiles in your powershell directory to ~/winfiles_old/\n* Create symlinks to the ps1 in ~/winfiles/ in your powershell directory\n\n## windows.ps1\n\nFor new windows box\n\n`./setup/windows.ps1` will configure box for privacy\n\nPlease review quickly before run to see if it matches your expectations\n\n## software.ps1\n\nFor new windows box\n\n`./setup/software.ps1` will install necessary s/w development software\n\n* Will update help\n* Powershell modules: `Posh-Git` , `PSWindowsUpdate`\n* Chocolatey (via Package Provider or classic `https://chocolatey.org/install.ps1` (default))\n* System and cli (`curl`, `nuget.commandline`, `webpi`, `git`, `nvm.portable`, `ruby`)\n* Additional Browsers (`GoogleChrome`) - more optionals commented out\n* Dev tools and frameworks (`atom`, `vscode`, `Fiddler4`, `winmerge` )\n* Activate nvm (+ npm gulp node-inspector yarn)\n* Install Python 2.7.9\n* Configure host for ASP.NET development\n\n## Configuring for ansible remote provisioning\n\nConfigureRemotingForAnsible.ps1 , example:\n\n`powershell.exe -File ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck  -EnableCredSSP -CertValidityDays 3650`\n\nor\n\n```ps\n[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nSet-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://bit.ly/ansible_remoting'))\n\n```\n\nor\n\n```ps\n[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12\nSet-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/Voronenko/winfiles/master/setup/ConfigureRemotingForAnsible.ps1'))\n\n```\n\nDepending on a software you will be installing with choco, on some rare situations you might also face\n\nDepending on your OS, you might also face\n\nhttps://support.microsoft.com/en-us/help/2842230/out-of-memory-error-on-a-computer-that-has-a-customized-maxmemorypersh\n\nalso you might face limit  https://github.com/ansible/ansible/issues/39327\n\nwhich can be changed with additional override\n\n```ps1\n# 2048 4096 8192 this is the max mem in MB\nSet-Item -Path WSMan:\\localhost\\Shell\\MaxMemoryPerShellMB -Value 2048\nRestart-Service -Name WinRM\n```\n\n\n## Confirming, that ansible setup is ready\n\nDependency - python pywinrm package\n```\npip install pywinrm\n```\n\nhostsfile can be kind of\n```\n[win]\n192.168.2.145\n\n[win:vars]\nansible_user=vagrant\nansible_password=password\nansible_connection=winrm\nansible_winrm_server_cert_validation=ignore\n```\n\n```\nansible windows -i hosts -m win_ping\n\n\n192.168.2.145 | SUCCESS =\u003e {\n    \"changed\": false,\n    \"ping\": \"pong\"\n}\n\n```\n\n\n## Getting connection from linux up - option A - using powershell over ssh transport\n\nIf for whatever reasons you want to connect interactively from linux box, things get more complicated.\n\nSo  you need to install Powershell 6.x on remote server together with OpenSSHServer using `setup/GetPowershell6LinuxRemoting.ps1`\n\nthan you need also to install Powershell 6.x for ubuntu\n\n```\n## Download the Microsoft repository GPG keys\nwget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb\n\n## Register the Microsoft repository GPG keys\nsudo dpkg -i packages-microsoft-prod.deb\n\n## Update the list of products\nsudo apt-get update\n\n## Install PowerShell\nsudo apt-get install -y powershell\n\n## Start PowerShell\npwsh\n```\n\nIf you configured everything right, you should be able to invoke:\n\n```\n$session = New-PSSession -HostName 192.168.2.145 -UserName Administrator\n\n\n $session\n Id Name            Transport ComputerName    ComputerType    State         Con\n                                                                            fig\n                                                                            ura\n                                                                            tio\n                                                                            nNa\n                                                                            me\n -- ----            --------- ------------    ------------    -----         ---\n  2 Runspace1       SSH       192.168.2.145   RemoteMachine   Opened        Def\n\n\nPS /home/slavko\u003e Enter-PSSession $session\n[Administrator@192.168.2.145]: PS C:\\Users\\Administrator\\Documents\u003e\n\nMode                LastWriteTime         Length Name\n----                -------------         ------ ----\nd-----         1/2/2019   6:51 AM                WindowsPowerShell\n\n```\n\nBut if you do not need to use some specific powershell functionality,\nyou also can do smth as simple as\n\n`ssh administrator@192.168.2.145`\n\n\n## Getting connection from linux up - option B - using embedded SSH server\n\n```ps1\n\nGet-WindowsCapability -Online | ? Name -like 'OpenSSH*'\n\nName  : OpenSSH.Client~~~~0.0.1.0\nState : Installed\n\nName  : OpenSSH.Server~~~~0.0.1.0\nState : NotPresent\n```\n\nIf server component is not installed - let's install it\n\n```ps1\nAdd-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0\n```\n\nOnce added start SSH server (as a Windows Service) and check if it's running.\n\n```ps1\nStart-Service sshd\nGet-Service sshd\n```\n\nSince it's a Windows Service you can see it as \"OpenSSH SSH Server\" in services.msc as well, or\n\n\n```ps1\nSet-Service -Name sshd -StartupType 'Automatic'\n```\n\nRemember that we SSH over port 22 so you'll have a firewall rule incoming on 22 at this point.\nSSH.  Windows.  Think twice to open any windows port to the world. I would always limit by ip.\n\nNow,\n\n```\nssh slavko@windows2016eval\n\nMicrosoft Windows [Version 10.0.17763.379]\n(c) 2018 Microsoft Corporation. All rights reserved.\n\nslavko@MSEDGEWIN10 C:\\Users\\Slavko\u003e\n\n```\n\nWe are set\n\n## Unsorted notes\n\n### Running console as system interactively\n\n```\npsexec.exe -i -s -d cmd.exe\n```\n\n### Running console as system in ConEmu\n\nCreate launch item `Shells::cmd(System)`\n\n```\ncmd.exe -new_console:aA\n```\n\nYou can always check who are you by invoking\n\n```\necho %USERDOMAIN%\\%USERNAME%\n```\n\nor in powershell\n\n```\nwrite-host $env:userdomain\\$env:username\n```\n\n### Powershell extra tools\n\nhttps://github.com/Pscx/Pscx\n\nPscx is hosted on the PowerShell Gallery. You can install Pscx with the following command:\n\n```ps1\nInstall-Module Pscx -Scope CurrentUser\n```\n\nYou may be prompted to trust the PSGallery. Respond with a 'y' (for yes) to proceed with the install.\n\nIf you already have installed Pscx from the PowerShell Gallery, you can update Pscx with the command:\n\n```ps1\nUpdate-Module Pscx\n```\n\nIt has multiple functions, in particular ones\n\n```ps1\nInvoke-BatchFile \"${env:ProgramFiles(x86)}\\Microsoft Visual Studio 12.0\\VC\\vcvarsall.bat\"\n```\nPSCX also has an Import-VisualStudioVars function:\n\n```ps1\nImport-VisualStudioVars -VisualStudioVersion 2017\n```\n\nin case of the issues, try workaround\n\n```ps1\n\n[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12\nRegister-PSRepository -Default -Verbose\nSet-PSRepository -Name \"PSGallery\" -InstallationPolicy Trusted\n\nInstall-Module Pscx -AllowClobber\n```\n\n\n### Summary on loading VisualStudio environment\n\n`Import-VisualStudioVars` is a handy function available in Pscx module https://github.com/Pscx/Pscx\nHowever, it has dependency on a VSSetup module https://github.com/microsoft/vssetup.powershell\n\n```ps1\n\n Install-Module Pscx -AllowClobber\n Install-Module VSSetup -Scope CurrentUser\n\n```\n\nonce installed, you can \n\n## Updating root certificats\n\nGet last certificates pack\n\n```cmd\ncertutil.exe -generateSSTFromWU roots.sst\n```\n\nnow either update them wia powershell\n\n```\n$sstStore = ( Get-ChildItem -Path C:\\roots.sst )\n$sstStore | Import-Certificate -CertStoreLocation Cert:\\LocalMachine\\Root\n```\n\n\nIf you happen to have updroots.exe utility from  KB931125 (Update for Root Certificates) in your system,\nor orifinal rootsupd.exe (you can unpack updroots.exe via  rootsupd.exe /c /t: C:\\PS\\rootsupd )\n\nYou can update root certs via elevated commandprompt.\n\n```cmd\nupdroots.exe roots.sst\n```\n\nNote, that for all certificates are stored in SST files, like authroots.sst, delroot.sst, etc. \nTo delete/install a certificate, you can use the following commands:\n\n```cmd\nupdroots.exe authroots.sst\nupdroots.exe -d delroots.sst\n```\n\n\nThere is another way to get the list of root certificates from Microsoft website. To do it, \ndownload the file http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootstl.cab (updated twice a month). \nUsing any archiver (or even Windows Explorer) unpack authrootstl.cab. It contains one file authroot.stl.\n\n\nYOu can install one using certutil.exe tool:\n\n```cmd\ncertutil -addstore -f root authroot.stl\n\nroot \"Trusted Root Certification Authorities\"\nCTL 0 added to store.\nCertUtil: -addstore command completed successfully.\n\n```\n\nYou can also import certificates using the certificate management console (Trust Root Certification Authorities -\u003e Certificates -\u003e All Tasks -\u003e Import). \nSpecify the path to your STL file with certificates.\n\nIn the same way, you can download and install the list of the revoked (disallowed) certificates that have been removed from Root Certificate Program. \nTo do it, download disallowedcertstl.cab (http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/disallowedcertstl.cab), \nunpack it and add to the Untrusted Certificates section using this command:\n\n```cmd\ncertutil -addstore -f  disallowed disallowedcert.stl\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoronenko%2Fwinfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoronenko%2Fwinfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoronenko%2Fwinfiles/lists"}