This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#requires -RunAsAdministrator | |
<#----------------------------------------------------------------------------- | |
Ashley McGlone, Microsoft Premier Field Engineer | |
http://aka.ms/goateepfe | |
February 2016 | |
Install-ADModule | |
For Windows 10 performs the following tasks: | |
- Downloads and installs Windows 10 RSAT for the appropriate system architecture | |
- Enables the RSAT AD PowerShell feature |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$servers = "dc1","dc3","sql1","wds1","ex1" | |
Foreach($s in $servers) | |
{ | |
if(!(Test-Connection -Cn $s -BufferSize 16 -Count 1 -ea 0 -quiet)) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enable-PSRemoting -Force | |
Start-Service WinRM | |
Set-Item wsman:\localhost\client\trustedhosts * -Force | |
Get-WindowsFeature | Where-Object {$_.name -Like "*DNS*"} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$description = "Network Name" | |
$staticIp = "" | |
$subnetMask = "" | |
$gateway = "" | |
$adapter = Get-CimInstance Win32_NetworkAdapterConfiguration | Where-Object { $_.Description -match $description} | |
$adapter | Invoke-CimMethod -Name EnableStatic -Arguments @{ IPAddress = $staticIp; SubnetMask = $subnetMask } | |
$adapter | Invoke-CimMethod -Name SetGateways -Arguments @{ DefaultIPGateway = $gateway; GatewayCostMetric = [UInt16] 1 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-ItemProperty "HKLM:\SOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityStatusIndicator" -Name "EnableActiveProbing" -Value "0" -PropertyType "Dword" | |
New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet" -Name "EnableActiveProbing" -Value "0" -PropertyType "Dword" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Get-WMIObject –query ‘SELECT * FROM SoftwareLicensingService’).OA3xOriginalProductKey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-WmiObject -Class Win32_OperatingSystem -Namespace root/cimv2 -ComputerName . | Format-List TotalVirtualMemorySize,TotalVisibleMemorySize,FreePhysicalMemory,FreeVirtualMemory,FreeSpaceInPagingFiles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run from current user session | |
(New-Object System.DirectoryServices.DirectorySearcher("(&(objectCategory=User)(samAccountName=$($env:username)))")).FindOne().GetDirectoryEntry().memberOf | Select-String GROUP_NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$computerSystem = Get-CimInstance CIM_ComputerSystem | |
$computerBIOS = Get-CimInstance CIM_BIOSElement | |
$computerOS = Get-CimInstance CIM_OperatingSystem | |
$computerCPU = Get-CimInstance CIM_Processor | |
$computerHDD = Get-CimInstance Win32_LogicalDisk -Filter "DeviceID = 'C:'" | |
Clear-Host | |
Write-Host "System Information for: " $computerSystem.Name -BackgroundColor DarkCyan | |
"Manufacturer: " + $computerSystem.Manufacturer | |
"Model: " + $computerSystem.Model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################## | |
# Creating a bootable USB drive for installing Windows | |
# on UEFI / GPT systems | |
########################################################## | |
########################################################## | |
# Start by clearing the screen, tell user how to start | |
########################################################## | |
cls |