Advanced Search
Search Results
9 total results found
Code Snippets
Snippets of code from various sources
Find All Domain Controllers
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...
Change Windows Computer Name
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...
Install Chrome from Powershell
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...
Windows Installed Printers and Port
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 ...
Fix Windows Computer has lost Domain Trust
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...
Windows Server 2019 SMB1
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 ...
Microsoft Photos will not start issue
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...
Fix Trust relationship Failed Issue Without Domain Rejoining
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 ...