I hereby claim:
- I am webtroter on github.
- I am webtroter (https://keybase.io/webtroter) on keybase.
- I have a public key whose fingerprint is BF85 3A27 82BC 2B69 16D9 A248 26F9 0983 9D2E 08DB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| $wshell = New-Object -ComObject Wscript.Shell | |
| $wshell.Popup("Please enter in your Domain Admin credentials. Please remember it should be in the form of DOMAIN\username. The second & third prompt for your credentials, it will be for Office365. At that time, please use [email protected]",0,"Credentials Needed!",0x0) | |
| $creds = Get-Credential | |
| $PSDefaultParameterValues = @{"*-AD*:Credential"=$creds} | |
| #CREATES AN EXCHANGE ONLINE SESSION | |
| $UserCredential = Get-Credential | |
| $ExchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection |
| function LaunchO365Console | |
| { | |
| Start-Process -FilePath "https://outlook.office365.com/ecp/Reporting/MailboxSearches.aspx" | |
| } | |
| #function Get-DomainAdminInfo | |
| $Creds = Get-Credential -Message "Enter username in DOMAIN\username format" | |
| $PSDefaultParameterValues = @{"*-AD*:Credential"=$Creds} |
| enum Departments { | |
| Admin | |
| Compta | |
| Ventes | |
| RetDev | |
| DevLogiciel | |
| DevMicro | |
| DevMateriel | |
| Operations | |
| Production |
| # WinRM needs to be enable: | |
| # win qc | |
| $Scriptblock = { | |
| Add-Type -AssemblyName System.Speech | |
| $SpeechSynth = New-Object System.Speech.Synthesis.SpeechSynthesizer | |
| $CatFact = (ConvertFrom-Json (Invoke-WebRequest -Uri 'http://catfact.ninja/facts' -UseBasicParsing)).data.fact | |
| $SpeechSynth.Speak("did you know?") | |
| $SpeechSynth.Speak($CatFact) | |
| } |
| #requires -version 5 | |
| <# | |
| .SYNOPSIS | |
| Returns | |
| .DESCRIPTION | |
| <Brief description of script> | |
| .PARAMETER |
| #Sophos Endpoint Removal Script | |
| #Usage examples: | |
| # .\removesophos.ps1 # Just logs all messages to screen and file.ss.é | |
| # .\removesophos.ps1 -Remove YES # Removes all Sophos components and logs all messages to screen and file. | |
| # .\removesophos.ps1 -Password 1234567 -Remove YES # Password will be provided to SEDCli.exe if TP is on and SEDCLi.exe exists. | |
| # .\removesophos.ps1 -ErrorOnly YES # Only print items that exist (errors) on screen. Still logs all to file. | |
| # .\removesophos.ps1 -Remove YES -Restart YES # At the end of the process restart the computer. 10 seconds delay by default intDelaySecondsRestart. | |
| # .\removesophos.ps1 -NoLogFile YES # No log file will be created. Messages will still be output to screen. Will run quicker. | |
| # .\removesophos.ps1 -Debug YES # Outputs a little more data to screen for debugging purposes. Not expected to be used in normal use. |
| #!/bin/bash | |
| # Variable Section | |
| SERVER="[email protected]" | |
| SRC=$SERVER":/media/sdf1/username/Completed" | |
| DEST="/media/Share/" | |
| LOGDIR="/var/log/sync-seedbox/" | |
| LOGFILE="/var/log/sync-seedbox/rsync_`date +%Y%m%d-%Hh%M`.log" | |
| LOCKDIR="/var/lock/" | |
| LOCKFILE="/var/lock/`basename $0`.lock" |
| [CmdletBinding(DefaultParameterSetName = "PreDown")] | |
| param ( | |
| [Parameter(ParameterSetName = "Setup")] | |
| [switch] | |
| $Setup, | |
| [Parameter(ParameterSetName = "Setup")] | |
| [switch] | |
| $RestartWGService, | |
| # WireGuard Interface | |
| [Parameter(Position = 0)] |
| function FillDisk { | |
| param ( | |
| $FillLimit = 20MB | |
| ) | |
| $remaining = (Get-Volume C | Select-Object -ExpandProperty SizeRemaining) - $FillLimit | |
| $filename = "vss-block_{0}G.dummy" -f ([math]::Round($remaining/1GB, 2)) | |
| & fsutil file createnew $filename $([math]::Floor($remaining)) | |
| } |