Category: Windows

How To Add or Remove a Path in Windows Environmental Paths

There are 2 functions to Add and Remove, at your convenience: # addEnvironmentalPath.ps1 $pathToAdd='C:\Scripts' $pathToRemove='C:\Scripts'…

PowerShell: Find Windows RDS Roles and Their Licensing Servers

# Get TS Licensing Servers (Enterprise or AD Registered) $termLicenseServers=Get-ADGroupMember -Identity "Terminal Server License Servers"…

How to Install Windows Dot Net 3.5 & 4.5

Run these commands to check dot net 3.5: PS C:\Windows\system32> import-module servermanagerPS C:\Windows\system32> get-windowsfeature web-asp-netDisplay…

PowerShell: Install App Using MSI on Remote Computers Via WinRM

# installMSiRemoteComputers.ps1 # version 0.0.1 $computernames='REMOTEPC001','REMOTEPC002' $thisMsiFile='C:\Temp\something.msi' $appName='testapp' $desiredVersion='1.0' $maxWaitSeconds=120 function installMsiOnRemoteComputers($computernames,$msiFile,$appName,$desiredVersion,$maxWaitSeconds){ function installMsiOnRemoteComputer{ param(…

PowerShell: Add Local Group Members Onto a Server List

Sometimes, the GUI method of accomplishing tasks is too arduous and error prone. Thus, these…

How To Fix Windows Corrupted Profile

Error messages: - We can't sign into your account. This problem can often be fixed…

PowerShell: Search Windows Event Logs

# searchWindowsEventsLog.ps1 $computername=$env:computername $logType='Security' $eventId=4732 $daysBack=365 $limit=9999 $messageLike="*Remote Desktop Users*" function searchWindowsEvents{ param( $computername=$env:computername $logType='Security'…

Changing User Password Using Command Lines or PowerShell

# Command-line method net user usernamehere newpasswordhere # Powershell Method 1 - via ActiveDirectory module…

Windows Event ID 2017: Unable to collect NUMA physical memory utilization data

Issue: Log Name: ApplicationSource: Microsoft-Windows-PerfOSDate: 9/12/2018 7:47:38 AMEvent ID: 2017Task Category: NoneLevel: WarningKeywords: ClassicUser: N/AComputer:…

Windows: How To Expand Disk Volumes That Are Not Adjacent the Intended Volume

Problem: Here's a scenario when a virtualized disk has been expanded in Hyper-V, Vmware, AWS,…

How to Move Windows Partitions

Problem: Resolution: choco install partition-assistant-standard -y Click a few buttons > done. Result:  

PowerShell: Enable TLS 1.2 on Windows

function enableTls12{ try{ $null=New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -Force $null=New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -Force $null=New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server'…

How to Disable Disk Checking on Windows Bootup

Run CMD or PowerShell as Administrator Issue this command to exclude checking of Systems volume…

PowerShell: Running Commands on Remote Computers

# runCommandsOnRemoteComputers.ps1 # User defined variables $computernames=@( 'SERVER001', 'SERVER002' ) $expectedExecutable='racadm.exe' $expectedInstallPath='C:\program files\Dell\SysMgt\iDRACTools\racadm' # Execution…

How To Use Command Line to Configure iDrac Settings

Step 1: Install RacADM $computerlist=@' SERVER1 SERVER2 '@ $computernames=@($computerlist -split "`n")|%{$_.Trim()} $fileURL="https://dl.dell.com/FOLDER08543783M/1/DellEMC-iDRACTools-Web-WINX64-10.3.0.0-4945.exe" $expectedExecutable='racadm.exe' $expectedInstallPath='C:\Program Files\Dell\SysMgt\iDRACTools\racadm'…

How To Create a Windows Scheduled Task to Call a Program or Script

Example on How To Call a Program: Set Action = Start a Program Set Program/Script…

Active Directory: Differences between Domain Local, Global, Universal Groups

Domain Local Groups: can contain users from any domain, but they can only be used…

Fix NetPlWiz and control userpasswords2 Grey-out Options

Problem: netplwiz has a grayed out 'Users must enter a user name and password to…

PowerShell: How To Configure Static IP Address

$nicName='NIC1' $ipaddress='192.168.0.222' $cidrPrefix=24 $defaultGateway='192.168.0.1' $dnsServers=@('8.8.8.8','4.4.2.2') $disableIpv6=$true function setNic($nicName,$ipAddress,$cidrPrefix,$defaultGateway,$dnsServers,$disableIpv6=$true ){ $ifIndex=(get-netadapter|?{$_.Name -eq $nicName}).ifIndex New-NetIPAddress -InterfaceIndex $ifIndex…

Windows: How to Create Software Raid 1 Mirror of C:\ Volume or Windows System Drive

Desired Result: Required Work: # Check disksDISKPART> list diskDisk ### Status Size Free Dyn Gpt--------…