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
#Requires -Modules NetSecurity | |
# Remote admin network | |
$RemoteNet = '1.2.3.4/255.255.255.248' | |
$AddressFilter = Get-NetFirewallRule -Group '@FirewallAPI.dll,-30267' | | |
Where-Object Profile -like 'Public' | | |
Get-NetFirewallAddressFilter | |
if ($AddressFilter.RemoteAddress -NotContains $RemoteNet) { | |
$remoteFilter = @($AddressFilter.RemoteAddress) + $RemoteNet |
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
#Requires -version 2.0 | |
function Start-AsAdmin { | |
<# | |
.Synopsis | |
Starts given PowerShell commands in elevated Powershell | |
.Description | |
Runs given Powershell commands in elevated environment. |
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 | |
Splits .CSV file into parts. | |
#> | |
param ( | |
[parameter( | |
Mandatory = $true | |
)] | |
[string] | |
# File name to split |
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
#Requires -Version 5.1 | |
#Requires -Modules Thycotic.SecretServer | |
[CmdletBinding( | |
SupportsShouldProcess | |
)] | |
param ( | |
[parameter( | |
Mandatory, | |
ParameterSetName = 'FolderName' |