Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

9 total results found

Code Snippets

Snippets of code from various sources

PowerShell
Bash
Windows Command Line

Find All Domain Controllers

Windows Command Line

To be run from an elevated prompt Command Line: nltest /dclist:{Full Domain Name} PowerShell $DomainName = {Full Domain Name Get-ADDomainController -Filter * -Server $DomainName | Select-Object Hostname,Ipv4address,isglobalcatalog,site,forest,operatingsys...

PowerShell
Active Directory

Change Windows Computer Name

Windows Command Line

Change Computer Name using PowerShell From an elevated PowerShell enter the following PowerShell’s command, substituting with your preferred name, and press the “Enter” to rename the computer: Rename-Computer -NewName "<NewHostname>" Change Computer Name us...

Windows Command Line
PowerShell

Install Chrome from Powershell

General Knowledge Google Chrome

Run from elevated Power Shell $Path = $env:TEMP; $Installer = "chrome_installer.exe"; Invoke-WebRequest "http://dl.google.com/chrome/install/375.126/chrome_installer.exe" -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args "/silent /inst...

Google Chrome
PowerShell

Windows Installed Printers and Port

Microsoft Windows Windows General

This is run from an elevated PowerShell prompt Executing this command will list the installed printer name and Port/IP address for the printer. get-printer | select name, portname Example Output name portname ...

Microsoft Windows
PowerShell

Fix Windows Computer has lost Domain Trust

Microsoft Windows Windows General

Log as a local admin, run PowerShell as administrator In PowerShell execute the following command Test-ComputerSecureChannel -repair -Credential (Get-Credential) Enter Domain Administrator credentials at the prompt. Voilá, no need to drop and join domain l...

Microsoft Windows
PowerShell

Windows Server 2019 SMB1

Microsoft Windows Windows Server

Not that you would want to but this is how to install SMB1 to Windows Server 2019 All commands should be run from an elevated PowerShellInstall dism /online /Enable-Feature /FeatureName:SMB1Protocol /All /source:c:\wim\mount\windows\winsxs /limitaccess ...

PowerShell
Windows Server

Microsoft Photos will not start issue

Microsoft Windows Windows General

Issue where Microsoft Photos shuts down as soon as it is started get-appxpackage *Microsoft.Windows.Photos* | remove-appxpackage Get-AppxPackage *photos* | Remove-AppxPackage Get-AppxPackage -allusers Microsoft.Windows.Photos | Foreach {Add-AppxPackage -Dis...

Microsoft Windows
PowerShell

Fix Trust relationship Failed Issue Without Domain Rejoining

Microsoft Windows Windows General

A failed trust relationship between the workstation and the domain is a common problem for AD administrators. When this problem occurs, the domain user can’t login to their domain-joined computer and receives an error:     The trust relationship between this ...

Microsoft Windows
PowerShell