Coder Social home page Coder Social logo

numbnet / sysadminsfriends Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mscholtes/sysadminsfriends

0.0 0.0 0.0 83 KB

SysAdminsFriends is a Powershell module that provides some tools that are useful for system administrators.

License: MIT License

PowerShell 98.71% Batchfile 1.29%

sysadminsfriends's Introduction

SysAdminsFriends

SysAdminsFriends is a Powershell module that provides some tools that are useful for system administrators.

  • Export-FirewallRules, Import-FirewallRules, Remove-FirewallRules for backup and restore of firewall rules with CSV or JSON files
  • Get-Sessions retrieves information on logon sessions (incl. RDP sessions) on a system
  • Start-Webserver is a Powershell web server without IIS
  • ConvertTo-Batch converts short Powershell scripts to cmd batches (that ignore the execution policy)
  • Split-File and Join-File split and join binary files fast
  • Export-FileSegment and Import-FileSegment extract and insert binary data
  • Replace-InFile replaces text in files with preserving the encoding
  • Compress-LogDirectory archives log files in a given path or all iis log directories
  • Invoke-AdminExplorer starts an administrative Explorer window
  • Get-RebootTime gets the last reboot time(s) fast

By Markus Scholtes, 2020

Installation

PS C:\> Install-Module SysAdminsFriends

(on Powershell V4 you may have to install PowershellGet before) or download from here: https://www.powershellgallery.com/packages/SysAdminsFriends/.

Functions

Export-FirewallRules, Import-FirewallRules and Remove-FirewallRules

Functions for exporting, importing and removing of firewall rules with CSV or JSON files. For details see the script version web page: Powershell scripts to export and import firewall rules.

Start-Webserver

Powershell function that starts a webserver (without IIS). Powershell command execution, script execution, upload, download and other functions are implemented. For details see the script version web page: Powershell Webserver.

Split-File and Join-File

Two Powershell functions to split and join binary files fast. The functions are using .Net BinaryWriter methods. The quick .CopyTo() method is used to join files. For details see the script version web page: Powershell functions to split and join binary files fast.

Export-FileSegment and Import-FileSegment

Two Powershell functions to extract and insert binary data from and to files. The functions are using .Net BinaryWriter and BinaryReader methods. For details see the script version web page: Export-Filesegment.

Get-Sessions

Powershell function to get information about interactive logins (including RDP sessions) including logon, connect, disconnect and logoff times. Session ID and remote host for RDP can be requested per parameter. For details see the script version web page: Get-Sessions: Powershell script for information on interactive logins (incl RDP).

ConvertTo-Batch

Generate cmd.exe batch files from short Powershell scripts. The Powershell scripts are Base64 encoded and handed to a new Powershell instance in the batch file. There is a limitation of 2975 characters for the script to convert. For details see the script version web page: Convert short Powershell scripts to batches.

Replace-InFile

Function to replace text in files programmatically without getting a mess with the text encodings. The function detects the encoding of each processed file and writes it back with the same encoding. For details see the script version web page: Replace-InFile.ps1: Replace text in files while preserving the encoding.

Compress-LogDirectory

This function compresses log files older than the current month to Zip archives in a given directory or in the IIS log directories and deletes the archived files. For details see the script version web page: Powershell script to compress log files (and IIS logs).

Invoke-AdminExplorer

Starts an administrative "File Open" dialog as a replacement for an elevated Windows Explorer that does not exists since Windows Vista. For details see the script version web page: "File Open" Dialog As Replacement for An Adminstrative Windows Explorer.

Test-Admin

Checks if the current Powershell runs in administrative mode (means is elevated if UAC is enabled). For details see the script version web page: "File Open" Dialog As Replacement for An Adminstrative Windows Explorer.

Get-RebootTime

Function to retrieve the latest reboot time(s) of a computer. For details see the script version web page: Retrieve latest reboot time(s).

Versions

1.1.4, 2020-12-12

New parameter -Policystore for Export-FirewallRules, Import-FirewallRules and Remove-FirewallRules

1.1.3, 2020-08-22

Added Export-FileSegment and Import-FileSegment

1.1.2, 2020-05-03

Split-File can chunk into parts of size > 2GB now

1.1.1, 2020-02-15

Added filtering options to Export-FirewallRules

1.1.0, 2019-08-30

Renamed Set-InFile to Replace-InFile

Added directory listing feature to Start-WebServer

1.0.0, 2019-05-20

First stable release (hope so)

sysadminsfriends's People

Contributors

mscholtes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.