This is a very nice script written by D. Strout over at VPSBoard.com here. Be sure to leave him some feedback and comments about it. Let us know how you have used it or even modified it for your needs.
We had a client with OpenVPN setup on a CPanel server and they kept getting these alerts. We decided to do some digging.
The IPTables that they were running for some reason created a route issue.
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT iptables -A FORWARD -j REJECT iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE iptables -t nat -A POSTROUTING -j SNAT --to-source SERVER-IP
Here’s the failure in /var/log/chksrvd.log:
echo "Enter the container ID to activate TUN/TAP on:" read CTID vzctl set $CTID --devnodes net/tun:rw --save vzctl set $CTID --devices c:10:200:rw --save vzctl set $CTID --capability net_admin:on --save vzctl exec $CTID mkdir -p /dev/net vzctl exec $CTID mknod /dev/net/tun c 10 200 vzctl exec $CTID chmod 600 /dev/net/tun vzctl restart $CTID
From time to time, either for troubleshooting or information purposes, there exists a need to get certain user information out of Active Directory. Though Microsoft has a bunch of great commands that query AD, I had run into a third-party software that met my need of getting information quickly. Quest has some great free Powershell scripting tools that help users get certain information out of Active Directory.
At this time, I needed to pull a summary of certain user’s accounts for auditing purposes and decided to script something together that would at a glance display pertinent information.
To remove an application with PowerShell you need to do two actions:
- Remove the provisioned package
- Remove the “installed” package from the user account.
According to Microsoft, the Remove-AppxProvisionedPackage cmdlet removes app packages (.appx) from a Windows image. App packages will not be installed when new user accounts are created. Packages will not be removed from existing user accounts. To remove app packages (.appx) that are not provisioned or to remove a package for a particular user only, use Remove-AppxPackage instead. (link)
1) Click on File Tab
2) Then Click on account setting
3) Double click on the IMAP account
4) Click on More Settings… Button
5) There will be three tabs on you dialog box. Click on Advanced.
6) Under Folder : Root Folder Path : Type the words “Inbox”
Tired of all those annoying Windows Apps that cause security issues and other problems and annoyances?
This script will nicely remove them all for you automatically.
foreach ($ID in $IDs)
#check id is in the range
if ($ID -ge 1 -and $ID -le $apps.count)
#Remove each app
Remove-AppxPackage -Package $apps[$ID] -ErrorAction SilentlyContinue
if (-not(Get-AppxPackage -Name $AppName))
Write-host "$AppName has been removed successfully"
Write-Warning "Remove '$AppName' failed! This app is part of Windows and cannot be uninstalled on a per-user basis."
$errorMsg = $Messages.WrongID
$errorMsg = $errorMsg -replace "Placeholder01",$ID
$customError = PSCustomErrorRecord `
-ExceptionString $errorMsg `
-ErrorCategory NotSpecified -ErrorID 1 -TargetObject $pscmdlet
The following steps will allow you have users login correctly. You may wish to at the very least add the group “Domain Users”.
By default Windows will block remote management requests which are required when running Active Directory and Group Policy Objects. The following is a Powershell script that can be ran locally on machines to enable remote management.
netsh advfirewall firewall add rule name=SQL-SSMS dir=in action=allow enable=yes profile=any
netsh advfirewall firewall add rule name=SQL-SSMS dir=out action=allow program=any enable=yes profile=any
netsh advfirewall firewall set rule group="Remote Administration" new enable=yes
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=yes
netsh advfirewall firewall set rule group="Remote Service Management" new enable=yes
netsh advfirewall firewall set rule group="Performance Logs and Alerts" new enable=yes
Netsh advfirewall firewall set rule group="Remote Event Log Management" new enable=yes
Netsh advfirewall firewall set rule group="Remote Scheduled Tasks Management" new enable=yes
netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes
netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes
netsh advfirewall firewall set rule group="Windows Firewall Remote Management" new enable =yes
netsh advfirewall firewall set rule group="windows management instrumentation (wmi)" new enable =yes
Open up Administrative CMD Promt or powershell and run the following:
powercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
This will unlock the power profiles on the Surface Pro 3