Day: December 24, 2019

PowerShell: Compare Time Stamps of Items in Mirroring Directories

# compareTimeStamps.ps1# Set variables$source="T:\DIRECTORY1"$destination="\\FILESHERVER\DIRECTORY1"$sampleSize=100$logFile="\\FILESHERVER\SHERVER1\sampleTimeStampLog.txt"function sampleTimeStamp{ param( [string]$sourceDirectory=$source, [string]$destinationDirectory=$destination, [int]$sampleCount=$sampleSize, [string]$timeStampLog=$logFile ) $timeStampTimer=[System.Diagnostics.Stopwatch]::StartNew() # Enable Remote…

Resolve Windows 2003 Logon Screen Blackout Problems

The problem:Administrators are unable to logon to a Windows 2003 Server. This is what they…

PowerShell: Setting Windows Firewall Rules

# Set variables for HTTP$protocolName="HTTP"$protocol="TCP"$portNumbers='80','443'$direction="Inbound"$scopes='Domain', 'Private'# Add Firewall RuleNew-NetFirewallRule -DisplayName "$protocolName-$direction" -Profile @($scopes) -Direction $direction…

PowerShell: Check VLAN of Windows Machine

Le Kommand: Get-NetAdapter|select Name,VlanID Sample Outputs PS C:\Windows\system32> Get-NetAdapter|select Name,VlanIDName VlanID---- ------Ethernet 1 0 PS…

PowerShell: Set ACL

# setAcl-v0.01.ps1# # What this script does:# 1. Set permissions on a set of "destination…