News

String manipulation using PowerShell

Posted by SysAdmin-Tools on

String manipulation using PowerShell

Adding to a string $strValue = "Test"$strValue += "ing"$strValueTesting   Removing info from a string using Replace() $stvValue = "Testing"$strValue = $strValue.Replace("ing","")$strValueTest   Remove part of a string using Remove() $strValue = "Test String"Remove from index 4 to end of string$strValue.Remove(4)TestRemove from index 0 to 5$strValue.Remove(0,5)String   Remove part of a string using Substring() $strString = "Test String"Remove from 0 to index 4$strValue.Substring(0,4)TestRemove from index 5 to end of string$strValue.Substring(5)String   Split a string into multiple sections and select only the part you need using its index. Very useful for email addresses$StrValue = "username@domain.com"$strValue.Split('@')usernamedomain.com$strValue.Split('@')[0]username To Lowercase() or Uppercase() "TEST".ToLower()test"test".ToUpper()TEST  ...

Read more →

Cool stuff you can do with PsTools with Examples

Posted by SysAdmin-Tools on

Cool stuff you can do with PsTools with Examples

PSTOOLS General Arguments These normally work with all the PsTools @file - runs the commands on all the computers in the file \\computername - Runs the command on the remote computer -u - Optional username for the computer -p - Optional password for the computer   DONT FORGET TO CHECK OUT OUR AWESOME TOOLS WHEN YOU ARE DONE READING THE ARTICLE  PsExec Description : Run applications with various properties   Run an application as SYSTEM in the console session PsExec -i -s application.exe Run an application in a specific session PsExec -i <sessionID> application.exe Other Uses Run applications as SYSTEM to...

Read more →

Easy PHP MySQL API for SysAdmins

Posted by SysAdmin-Tools on

Easy PHP MySQL API for SysAdmins

Welcome to SysAdmin-Tools!This blog explains how to create a simple PHP API in CPanel. This can also be completed locally, but takes a little more work. This API will allow you to post data to MySQL via a URL and read the data in MySQL by browsing to a URL. It also has an example of calling a specific row in the database based on an input. This is quite useful once you understand how it works and can customize the API to your needs. I really tried to make it as easy as possible so that almost anyone can understand that is...

Read more →

Useful NMAP commands for SysAdmins

Posted by SysAdmin-Tools on

Useful NMAP commands for SysAdmins

NMAP Is an extremely powerful tool for network scanning, surveillance and vulnerability management.The typical format of an NMAP command is as follows. nmap -function --script=scriptname <target>  The target can be a host (192.168.0.1) or a network (192.168.0.0/24)  Typical open port (services) scan nmap -sV <target>nmap -sV <network/subnet> (Example <192.168.0.0/24) LETS GET INTO IT! SSL NMAP Commands Enumerate the SSL ciphers enabled on a server/device to see if SSL2, SSL3 or TLS1.0 is still enabled nmap -sV --script ssl-enum-ciphers -p 443 <target> Detects whether a server is vulnerable to the OpenSSL Heartbleed bug nmap -p 443 --script ssl-heartbleed <target> Weak ephemeral Diffie-Hellman parameter...

Read more →

Easy GPO Loopback processing that works

Posted by SysAdmin-Tools on

Easy GPO Loopback processing that works

WHAT IS LOOPBACK PROCESSING?  Loopback processing allows you to apply user policies to computer objects. Like when you want to apply specific user policies to users only when they log into a terminal server, but not on their normal workstations.CREATE THE TWO GPO POLICIES 1. Create a Computer and User policy.The computer policy will be used to apply loopback processing to the device and the user policy will be used to host the settings for the selected users or groups. 2. Link both user and computer policies to the Computer OU that contains the target device. COMPUTER POLICY CHANGES3. NB: Unlink "Authenticated Users"...

Read more →