https://gist.github.com/cjfarrelly/1c1609913b1de1d602c2
https://gist.github.com/kenpb/0ba0108d4ef0225e540a
https://gist.github.com/sdovnic/e0121316734049e59ef3
https://github.com/lukegackle/PowerShell-Self-Elevate-Keeping-Current-Directory
https://gist.github.com/tonylea/c19107d92412e724650eeb1e1edb24fb
https://gist.github.com/vivek1986/af1f8e68396923bd0ecc781bd6b3b923
https://gist.github.com/vivek1986/9f7d8a16bf34a9e14cd4776485209c2f
This file contains 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 | |
powershell -c "iex ((Get-Content '%~f0') -join [Environment]::Newline); iex 'main %*'" | |
goto :eof | |
#> | |
$validExtensions = '.mkv', '.mp4' | |
Get-ChildItem -File | | |
Where-Object Extension -In $validExtensions | | |
Where-Object Length -GT 500mb | |
-
Open PowerShell in Admin mode(Run As Administrator):
-
Run following commands 1-by-1 or altogether as mentioned below:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
#### OR ####
- Open PowerShell in Admin Mode(Run As Administrator)
- Run following command to get List of All PnpDevices present in the OS/System:
Get-WmiObject Win32_PNPEntity | Select Name, DeviceID
- Run following command to filter the data-list and get the Device Info that you want to toggle:
Get-WmiObject Win32_PNPEntity | Select Name, DeviceID | Where Name -Match "HID"
- Put this Batch Script in FarCry install folder inside FCData folder (C:\Games\Far Cry\FCData):
- Name this script RenameAndExtractScriptsPakFile.bat
@echo off && setlocal
copy /b /v /y Scripts.pak Scripts.zip
md Backups && copy /b /v /y Scripts.pak ".\Backups"
powershell Expand-Archive Scripts.zip -DestinationPath .
del /a /f /s /q ".\Scripts.zip"
start "" ".\SCRIPTS\Default\Entities\Weapons"
This file contains 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 && setlocal | |
:checkPrivileges | |
NET FILE 1>NUL 2>NUL | |
if '%errorlevel%' == '0' ( | |
goto mainScript | |
) else ( | |
goto getPrivileges | |
) |
This file contains 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
$Loc = Get-Location | |
"Security.Principal.Windows" | % { IEX "( [ $_`Principal ] [$_`Identity ]::GetCurrent() ).IsInRole( 'Administrator' )" } | ? { | |
$True | % { $Arguments = @('-NoProfile','-ExecutionPolicy Bypass','-NoExit','-File',"`"$($MyInvocation.MyCommand.Path)`"","\`"$Loc\`""); | |
Start-Process -FilePath PowerShell.exe -Verb RunAs -ArgumentList $Arguments; } } | |
(Get-Location).ToString() | |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine | |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser | |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process |
This file contains 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
[PHP] | |
max_execution_time = 18000 | |
max_input_time = 3600 | |
memory_limit = 512M | |
error_log = "{PHP_Dir_Path}\logs\error.log" | |
extension_dir = "{PHP_Dir_Path}\ext" | |
upload_max_filesize = 16M | |
max_file_uploads = 20 | |
extension=bz2 | |
extension=curl |
This file contains 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
<# | |
.SYNOPSIS : PowerShell script to set Ethernet connection as metered or not metered | |
.AUTHOR : Michael Pietroforte | |
.SITE : https://4sysops.com | |
#> | |
# Retrieved from https://4sysops.com/archives/set-windows-10-ethernet-connection-to-metered-with-powershell/ |
This file contains 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
function Power-Delete { | |
[CmdletBinding()] | |
param( | |
[parameter(Position = 0, ValueFromRemainingArguments = $true, ValueFromPipelineByPropertyName = $true)] | |
$FullName, | |
[switch] | |
$AllHardLinks | |
) | |
process { |
NewerOlder