Install-Module PSCumulus -Scope CurrentUser
Import-Module PSCumulus
Invoke-WebRequest https://raw.githubusercontent.com/adilio/PSCumulus/main/scripts/demo-setup.ps1 -OutFile demo-setup.ps1
. ./demo-setup.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create a user account at cloudsmith.io | |
| # Create an Org and Repository at cloudsmith.io | |
| # In your PowerShell console, | |
| # check that PSGallery repo is present only | |
| Get-PSRepository | |
| # Build Repository Source URI | |
| $RepoName = 'YOUR-REPO-NAME' | |
| $OrgName = 'YOUR-ORG' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create a user account at cloudsmith.io | |
| # Create an Org and Repository at cloudsmith.io | |
| # Build Repository Source URI | |
| $RepoName = 'psdemo' | |
| $User = 'YOUR_USER_NAME_HERE' | |
| $RepoSource = "https://nuget.cloudsmith.io/$User/$RepoName/v2/" | |
| # We needa a PSCredential to upload to repo | |
| $Key = $ENV:CLOUDSMITH_API_KEY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Stop-Service nexus | |
| #Backup SSL Configuration | |
| if(-not (Test-Path C:\nexusbackup)){ | |
| New-Item C:\nexusbackup -ItemType Directory | |
| } | |
| if(Test-Path C:\ProgramData\nexus\etc\ssl\keystore.jks){ | |
| Copy-Item C:\ProgramData\nexus\etc\ssl\keystore.jks C:\nexusbackup | |
| } |
I hereby claim:
- I am adilio on github.
- I am adilio (https://keybase.io/adilio) on keybase.
- I have a public key ASAA457_y7Q9ce12VjfS7_kOWi4Bl_bLrqIZvqVA3RzStAo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Colin Andress | |
| # Modified by: adilio | |
| # Github Link: https://github.com/Column01 | |
| Write-Output 'Getting Windows User and Slack version' | |
| $user = $env:UserName | |
| if (Test-Path -Path "C:\Users\$user\AppData\Roaming\Slack\storage\slack-settings") { | |
| $json = Get-Content "C:\Users\$user\AppData\Roaming\Slack\storage\slack-settings" | Out-String | ConvertFrom-Json | |
| } | |
| else { | |
| Write-Output 'Unable to find the slack version info. Is slack installed from the windows store? Make sure it is from the slack website!' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| if "%1%" == "precustomization" ( | |
| echo No pre-customization tasks to run | |
| ) else if "%1%" == "postcustomization" ( | |
| echo Running post-customization tasks | |
| reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff" /f | |
| reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f | |
| reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f | |
| reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f | |
| netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run this script in an elevated prompt, and quit and reload Slack after | |
| $slackBaseDir = "C:\Program Files\Slack\" | |
| $installations = Get-ChildItem $slackBaseDir -Directory | Where-Object { $_.Name.StartsWith("app-") } | |
| $version = $installations | Sort-Object { [version]$_.Name.Substring(4) } | Select-Object -Last 1 | |
| Write-Output "Choosing highest present Slack version: $version" | |
| $customContent = @' | |
| // First make sure the wrapper app is loaded |
NewerOlder