<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://dfwlpiki.dfwlp.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://dfwlpiki.dfwlp.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jhorne</id>
		<title>DFWLPiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://dfwlpiki.dfwlp.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jhorne"/>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Special:Contributions/Jhorne"/>
		<updated>2026-04-06T15:27:47Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.15</generator>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2024-03-12T22:42:43Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Locate AD Account Lockout Events (must run this powershell on the PDC Emulator)&lt;br /&gt;
 get-addomain | select PDCEmulator&lt;br /&gt;
 Get-WinEvent -FilterHashtable @{logname='security'; id=4740} | fl&lt;br /&gt;
Create new DNS record&lt;br /&gt;
 Add-DnsServerResourceRecordA -Name hostname -ZoneName fqdn.domain.com -IPv4Address 192.168.99.21&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install Hyper-V Role&lt;br /&gt;
 Install-WindowsFeature Hyper-V, RSAT-Hyper-V-Tools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Install Standard File and Print Services&lt;br /&gt;
 Install-WindowsFeature Print-Services, Print-Server, FS-FileServer, FS-Resource-Manager -IncludeManagementTools&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 11*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Check or Relocate Domain FSMO Roles&lt;br /&gt;
 Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator&lt;br /&gt;
 Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster&lt;br /&gt;
 Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -OperationMasterRole 0,1,2,3,4 -Identity SERVERNAME&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Search Event Logs about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Search Event Logs about IP Conflict events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;4199&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
Export and Import Network Shares&lt;br /&gt;
 reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
 reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag</id>
		<title>Dell OMSA Non-Certified Drive Flag</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag"/>
				<updated>2024-01-03T23:32:28Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Dell Servers]]&lt;br /&gt;
Turn off non-certified disk alert in OpenManage:&lt;br /&gt;
&lt;br /&gt;
Esxi&lt;br /&gt;
 /etc/cim/dell/srvadmin/srvadmin-storage/stsvc.ini&lt;br /&gt;
Windows&lt;br /&gt;
 C:\Program Files\Dell\SysMgt\sm\stsvc.ini&lt;br /&gt;
Linux&lt;br /&gt;
 /opt/dell/srvadmin/etc/srvadmin-storage/stsvc.ini&lt;br /&gt;
&lt;br /&gt;
Loate the below line, it is generally near the top.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
; nonDellCertified flag for blocking all non-dell certified alerts.&lt;br /&gt;
NonDellCertifiedFlag=yes &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change to no.  Restart OpenManage services.  use admin powershell:&lt;br /&gt;
 restart-service dcstor64 -force&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2023-08-25T22:37:28Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Locate AD Account Lockout Events (must run this powershell on the PDC Emulator)&lt;br /&gt;
 get-addomain | select PDCEmulator&lt;br /&gt;
 Get-WinEvent -FilterHashtable @{logname='security'; id=4740} | fl&lt;br /&gt;
Create new DNS record&lt;br /&gt;
 Add-DnsServerResourceRecordA -Name hostname -ZoneName fqdn.domain.com -IPv4Address 192.168.99.21&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install Hyper-V Role&lt;br /&gt;
 Install-WindowsFeature Hyper-V, RSAT-Hyper-V-Tools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Install Standard File and Print Services&lt;br /&gt;
 Install-WindowsFeature Print-Services, Print-Server, FS-FileServer, FS-Resource-Manager -IncludeManagementTools&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 11*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Check or Relocate Domain FSMO Roles&lt;br /&gt;
 Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator&lt;br /&gt;
 Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster&lt;br /&gt;
 Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -Identity SERVERNAME -OperationMasterRole 0,1,2,3,4&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Search Event Logs about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Search Event Logs about IP Conflict events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;4199&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
Export and Import Network Shares&lt;br /&gt;
 reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
 reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag</id>
		<title>Dell OMSA Non-Certified Drive Flag</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag"/>
				<updated>2023-06-18T13:02:50Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Dell Servers]]&lt;br /&gt;
Turn off non-certified disk alert in OpenManage:&lt;br /&gt;
&lt;br /&gt;
Esxi&lt;br /&gt;
 /etc/cim/dell/srvadmin/srvadmin-storage/stsvc.ini&lt;br /&gt;
Windows&lt;br /&gt;
 C:\Program Files\Dell\SysMgt\sm\stsvc.ini&lt;br /&gt;
&lt;br /&gt;
Loate the below line, it is generally near the top.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
; nonDellCertified flag for blocking all non-dell certified alerts.&lt;br /&gt;
NonDellCertifiedFlag=yes &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change to no.  Restart OpenManage services.  use admin powershell:&lt;br /&gt;
 restart-service dcstor64 -force&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag</id>
		<title>Dell OMSA Non-Certified Drive Flag</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag"/>
				<updated>2023-06-18T13:02:29Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Dell Servers]]&lt;br /&gt;
Turn off non-certified disk alert in OpenManage:&lt;br /&gt;
&lt;br /&gt;
Esxi&lt;br /&gt;
 /etc/cim/dell/srvadmin/srvadmin-storage/stsvc.ini&lt;br /&gt;
Windows&lt;br /&gt;
 C:\Program Files\Dell\SysMgt\sm\stsvc.ini&lt;br /&gt;
&lt;br /&gt;
Loate the below line, it is generally near the top.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
; nonDellCertified flag for blocking all non-dell certified alerts.&lt;br /&gt;
NonDellCertifiedFlag=yes &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change to no.  Restart OpenManage services.  use admin powershell:&lt;br /&gt;
 restart-service dcstor64&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2022-11-30T13:32:29Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Locate AD Account Lockout Events (must run this powershell on the PDC Emulator)&lt;br /&gt;
 get-addomain | select PDCEmulator&lt;br /&gt;
 Get-WinEvent -FilterHashtable @{logname='security'; id=4740} | fl&lt;br /&gt;
Create new DNS record&lt;br /&gt;
 Add-DnsServerResourceRecordA -Name hostname -ZoneName fqdn.domain.com -IPv4Address 192.168.99.21&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install Hyper-V Role&lt;br /&gt;
 Install-WindowsFeature Hyper-V, RSAT-Hyper-V-Tools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Install Standard File and Print Services&lt;br /&gt;
 Install-WindowsFeature Print-Services, Print-Server, FS-FileServer, FS-Resource-Manager -IncludeManagementTools&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Check or Relocate Domain FSMO Roles&lt;br /&gt;
 Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator&lt;br /&gt;
 Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster&lt;br /&gt;
 Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -Identity SERVERNAME -OperationMasterRole 0,1,2,3,4&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Search Event Logs about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Search Event Logs about IP Conflict events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;4199&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
Export and Import Network Shares&lt;br /&gt;
 reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
 reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Recovering_After_Failed_Update_All_Services_Disabled</id>
		<title>Recovering After Failed Update All Services Disabled</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Recovering_After_Failed_Update_All_Services_Disabled"/>
				<updated>2022-07-13T02:51:24Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Exchange]]&lt;br /&gt;
1) Determine what update failed, and manually install the failed CU patch.  &lt;br /&gt;
 . .\Get-WuaHistory.ps1&lt;br /&gt;
 Get-WuaHistory | Format-Table&lt;br /&gt;
2) Download the patch from Microsoft Update Catalog: https://www.catalog.update.microsoft.com/Home.aspx.  Manually apply the patch.&amp;lt;br&amp;gt;&lt;br /&gt;
3) Reset exchange services/dependencies to automatic&lt;br /&gt;
 Get-Service | Where-Object { $_.DisplayName –like “Microsoft Exchange *” } | Set-Service –StartupType Automatic&lt;br /&gt;
 Get-Service | Where-Object { $_.DisplayName –like “Microsoft Exchange IMAP*” } | Set-Service –StartupType Manual&lt;br /&gt;
 Get-Service | Where-Object { $_.DisplayName –like “Microsoft Exchange POP*” } | Set-Service –StartupType Manual&lt;br /&gt;
 Get-Service | Where-Object { $_.DisplayName –eq “IIS Admin Service” } | Set-Service –StartupType Automatic&lt;br /&gt;
 Get-Service | Where-Object { $_.DisplayName –eq “Microsoft Filtering Management Service” } | Set-Service –StartupType Automatic&lt;br /&gt;
 Get-Service | Where-Object { $_.DisplayName –eq “World Wide Web Publishing Service” } | Set-Service –StartupType Automatic&lt;br /&gt;
 Get-Service | Where-Object { $_.DisplayName –eq “Tracing Service for Search in Exchange” } | Set-Service –StartupType Automatic&lt;br /&gt;
4) Reboot the server&amp;lt;br&amp;gt;&lt;br /&gt;
5) Verify exchange services are started, and set for Automatic Start.&amp;lt;br&amp;gt;&lt;br /&gt;
6) Verify exchange servbice are in an active state, and not set for maintenance&lt;br /&gt;
 Get-ServerComponentState -Identity SERVERNAME&lt;br /&gt;
 Set-ServerComponentState -Identity SERVERNAME -Component ServerWideOffline -State Active -Requester Functional&lt;br /&gt;
 Set-ServerComponentState -Identity SERVERNAME  -Component ServerWideOffline -State Active&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Exchange_Server_Mailbox_Migration</id>
		<title>Exchange Server Mailbox Migration</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Exchange_Server_Mailbox_Migration"/>
				<updated>2022-05-19T20:49:45Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Exchange]]&lt;br /&gt;
==Exporting and Importing Mailboxes for Offline Exchange Server Migration==&lt;br /&gt;
&lt;br /&gt;
Exporting from Exchange 2007:&lt;br /&gt;
&lt;br /&gt;
 Get-Mailbox | Add-MailboxPermission –user [adminusername] –AccessRight FullAccess –Inheritancetype all&lt;br /&gt;
 Get-Mailbox -Database “[SERVERNAME]\First Storage Group\Mailbox Database” | Export-Mailbox -PSTFolderPath c:\PSTs&lt;br /&gt;
 Get-Mailbox -Database “[SERVERNAME]\First Storage Group\Mailbox Database” | Import-Mailbox -PSTFolderPath c:\PSTs&lt;br /&gt;
 Get-Mailbox | Remove-MailboxPermission –user [adminusername] –AccessRight FullAccess –Inheritancetype all&lt;br /&gt;
&lt;br /&gt;
Single run:&amp;lt;br&amp;gt;&lt;br /&gt;
 Import-Mailbox -Identity &amp;lt;mailboxUser&amp;gt; -PSTFolderPath D:\PSTs&lt;br /&gt;
 Export-Mailbox -Identity &amp;lt;mailboxUser&amp;gt; -PSTFolderPath D:\PSTs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now same thing, but Exchange 2010&lt;br /&gt;
 New-ManagementRoleAssignment –Role “Mailbox Import Export” –User [DOMAIN\username]&lt;br /&gt;
 foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath &amp;quot;\\UNCPath\PSTs\$($i.Alias).pst&amp;quot; }&lt;br /&gt;
 Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest&lt;br /&gt;
&lt;br /&gt;
Same thing, but Exchange 2016 (or probably newer)&lt;br /&gt;
 New-ManagementRoleAssignment –Role “Mailbox Import Export” –User [DOMAIN\username]&lt;br /&gt;
 New-MailboxExportRequest -Mailbox ALIAS -FilePath \\UNCPath\PSTs\ALIAS.pst&lt;br /&gt;
 foreach ($i in (get-mailbox)) { New-MailboxExportRequest -Mailbox $i.Alias -FilePath \\UNCPath\PSTs\$($i.Alias).pst }&lt;br /&gt;
 foreach ($i in (get-mailbox)) { New-MailboxExportRequest -Mailbox $i.Alias -IsArchive -FilePath \\UNCPath\PSTs\$($i.Alias).pst }&lt;br /&gt;
 Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest&lt;br /&gt;
&lt;br /&gt;
Importing all .Pst files in Exchange 2013 or 2016&lt;br /&gt;
&lt;br /&gt;
(don't forget to ensure New-ManagementRoleAssignment has been set if you're working with a different server AND restart Exchange powershell)&lt;br /&gt;
  Dir \\HOSTNAME\e$\PSTs\*.pst | %{ New-MailboxImportRequest -Name RecoveredPST -BatchName Recovered -BadItemLimit 1000000 -AcceptLargeDataLoss -Mailbox $_.BaseName -FilePath $_.FullName}&lt;br /&gt;
 Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest&lt;br /&gt;
&lt;br /&gt;
Same thing, but single maildatabase:&lt;br /&gt;
 New-MailboxImportRequest -Mailbox [Username] -IsArchive -FilePath \\UNCPath\PSTs\filename.pst&lt;br /&gt;
&lt;br /&gt;
==Mailbox Migrations==&lt;br /&gt;
Move Mailbox from one database to another:&lt;br /&gt;
Test it to see if a sigle mailbox is ready to move:&lt;br /&gt;
 New-MoveRequest -identity jhorne -TargetDatabase &amp;quot;DFWLP DEV Mailboxes&amp;quot; -WhatIf&lt;br /&gt;
Then move it: &lt;br /&gt;
 New-MoveRequest -identity jhorne -TargetDatabase &amp;quot;DFWLP DEV Mailboxes&amp;quot;&lt;br /&gt;
Move all Mailboxes: &lt;br /&gt;
 foreach ($i in (Get-Mailbox)) { New-MoveRequest -Identity $i -TargetDatabase &amp;quot;DLP Prod Mailboxes&amp;quot; }&lt;br /&gt;
Move Arbitration, Auditlog, and DiscoverySearch:&lt;br /&gt;
 Get-Mailbox -Arbitration | New-Moverequest -Targetdatabase &amp;quot;Database Name&amp;quot;&lt;br /&gt;
 Get-Mailbox DiscoverySearchMailbox* | New-MoveRequest -TargetDatabase &amp;quot;Database Name&amp;quot;&lt;br /&gt;
 Get-Mailbox -Database DLP-PROD01 -AuditLog | New-MoveRequest -TargetDatabase &amp;quot;Database Name&amp;quot;&lt;br /&gt;
List all mailboxes:&lt;br /&gt;
 Get-mailbox&lt;br /&gt;
List all mailboxes and show current database:&lt;br /&gt;
 Get-Mailbox | fl alias,database&lt;br /&gt;
List current migration jobs:&lt;br /&gt;
 Get-MoveRequest&lt;br /&gt;
 Get-MoveRequestStatistics -Identity username | fl&lt;br /&gt;
 Get-MoveRequestStatistics -Identity username | fl totalmailboxitemcount,bytestransferred,itemstransferred,PercentComplete&lt;br /&gt;
Remove completed migration jobs:&lt;br /&gt;
 Get-MoveRequest -MoveStatus completed | Remove-MoveRequest&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Exchange_Server_Mailbox_Migration</id>
		<title>Exchange Server Mailbox Migration</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Exchange_Server_Mailbox_Migration"/>
				<updated>2022-05-19T18:38:18Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Exchange]]&lt;br /&gt;
==Exporting and Importing Mailboxes for Offline Exchange Server Migration==&lt;br /&gt;
&lt;br /&gt;
Exporting from Exchange 2007:&lt;br /&gt;
&lt;br /&gt;
 Get-Mailbox | Add-MailboxPermission –user [adminusername] –AccessRight FullAccess –Inheritancetype all&lt;br /&gt;
 Get-Mailbox -Database “[SERVERNAME]\First Storage Group\Mailbox Database” | Export-Mailbox -PSTFolderPath c:\PSTs&lt;br /&gt;
 Get-Mailbox -Database “[SERVERNAME]\First Storage Group\Mailbox Database” | Import-Mailbox -PSTFolderPath c:\PSTs&lt;br /&gt;
 Get-Mailbox | Remove-MailboxPermission –user [adminusername] –AccessRight FullAccess –Inheritancetype all&lt;br /&gt;
&lt;br /&gt;
Single run:&amp;lt;br&amp;gt;&lt;br /&gt;
 Import-Mailbox -Identity &amp;lt;mailboxUser&amp;gt; -PSTFolderPath D:\PSTs&lt;br /&gt;
 Export-Mailbox -Identity &amp;lt;mailboxUser&amp;gt; -PSTFolderPath D:\PSTs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now same thing, but Exchange 2010&lt;br /&gt;
 New-ManagementRoleAssignment –Role “Mailbox Import Export” –User [DOMAIN\username]&lt;br /&gt;
 foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath &amp;quot;\\UNCPath\PSTs\$($i.Alias).pst&amp;quot; }&lt;br /&gt;
 Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest&lt;br /&gt;
&lt;br /&gt;
Same thing, but Exchange 2016 (or probably newer)&lt;br /&gt;
 New-ManagementRoleAssignment –Role “Mailbox Import Export” –User [DOMAIN\username]&lt;br /&gt;
 foreach ($i in (get-mailbox)) { New-MailboxExportRequest -Mailbox $i.Alias -FilePath \\UNCPath\PSTs\$($i.Alias).pst }&lt;br /&gt;
 foreach ($i in (get-mailbox)) { New-MailboxExportRequest -Mailbox $i.Alias -IsArchive -FilePath \\UNCPath\PSTs\$($i.Alias).pst }&lt;br /&gt;
 Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest&lt;br /&gt;
&lt;br /&gt;
Importing all .Pst files in Exchange 2013 or 2016&lt;br /&gt;
&lt;br /&gt;
(don't forget to ensure New-ManagementRoleAssignment has been set if you're working with a different server AND restart Exchange powershell)&lt;br /&gt;
  Dir \\HOSTNAME\e$\PSTs\*.pst | %{ New-MailboxImportRequest -Name RecoveredPST -BatchName Recovered -BadItemLimit 1000000 -AcceptLargeDataLoss -Mailbox $_.BaseName -FilePath $_.FullName}&lt;br /&gt;
 Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest&lt;br /&gt;
&lt;br /&gt;
Same thing, but single maildatabase:&lt;br /&gt;
 New-MailboxImportRequest -Mailbox [Username] -IsArchive -FilePath \\UNCPath\PSTs\filename.pst&lt;br /&gt;
&lt;br /&gt;
==Mailbox Migrations==&lt;br /&gt;
Move Mailbox from one database to another:&lt;br /&gt;
Test it to see if a sigle mailbox is ready to move:&lt;br /&gt;
 New-MoveRequest -identity jhorne -TargetDatabase &amp;quot;DFWLP DEV Mailboxes&amp;quot; -WhatIf&lt;br /&gt;
Then move it: &lt;br /&gt;
 New-MoveRequest -identity jhorne -TargetDatabase &amp;quot;DFWLP DEV Mailboxes&amp;quot;&lt;br /&gt;
Move all Mailboxes: &lt;br /&gt;
 foreach ($i in (Get-Mailbox)) { New-MoveRequest -Identity $i -TargetDatabase &amp;quot;DLP Prod Mailboxes&amp;quot; }&lt;br /&gt;
Move Arbitration, Auditlog, and DiscoverySearch:&lt;br /&gt;
 Get-Mailbox -Arbitration | New-Moverequest -Targetdatabase &amp;quot;Database Name&amp;quot;&lt;br /&gt;
 Get-Mailbox DiscoverySearchMailbox* | New-MoveRequest -TargetDatabase &amp;quot;Database Name&amp;quot;&lt;br /&gt;
 Get-Mailbox -Database DLP-PROD01 -AuditLog | New-MoveRequest -TargetDatabase &amp;quot;Database Name&amp;quot;&lt;br /&gt;
List all mailboxes:&lt;br /&gt;
 Get-mailbox&lt;br /&gt;
List all mailboxes and show current database:&lt;br /&gt;
 Get-Mailbox | fl alias,database&lt;br /&gt;
List current migration jobs:&lt;br /&gt;
 Get-MoveRequest&lt;br /&gt;
 Get-MoveRequestStatistics -Identity username | fl&lt;br /&gt;
 Get-MoveRequestStatistics -Identity username | fl totalmailboxitemcount,bytestransferred,itemstransferred,PercentComplete&lt;br /&gt;
Remove completed migration jobs:&lt;br /&gt;
 Get-MoveRequest -MoveStatus completed | Remove-MoveRequest&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Exchange_Server_Mailbox_Migration</id>
		<title>Exchange Server Mailbox Migration</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Exchange_Server_Mailbox_Migration"/>
				<updated>2022-05-19T18:37:49Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Exchange]]&lt;br /&gt;
==Exporting and Importing Mailboxes for Offline Exchange Server Migration==&lt;br /&gt;
&lt;br /&gt;
Exporting from Exchange 2007:&lt;br /&gt;
&lt;br /&gt;
 Get-Mailbox | Add-MailboxPermission –user [adminusername] –AccessRight FullAccess –Inheritancetype all&lt;br /&gt;
 Get-Mailbox -Database “[SERVERNAME]\First Storage Group\Mailbox Database” | Export-Mailbox -PSTFolderPath c:\PSTs&lt;br /&gt;
 Get-Mailbox -Database “[SERVERNAME]\First Storage Group\Mailbox Database” | Import-Mailbox -PSTFolderPath c:\PSTs&lt;br /&gt;
 Get-Mailbox | Remove-MailboxPermission –user [adminusername] –AccessRight FullAccess –Inheritancetype all&lt;br /&gt;
&lt;br /&gt;
Single run:&amp;lt;br&amp;gt;&lt;br /&gt;
 Import-Mailbox -Identity &amp;lt;mailboxUser&amp;gt; -PSTFolderPath D:\PSTs&lt;br /&gt;
 Export-Mailbox -Identity &amp;lt;mailboxUser&amp;gt; -PSTFolderPath D:\PSTs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now same thing, but Exchange 2010&lt;br /&gt;
 New-ManagementRoleAssignment –Role “Mailbox Import Export” –User [DOMAIN\username]&lt;br /&gt;
 foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath &amp;quot;\\UNCPath\PSTs\$($i.Alias).pst&amp;quot; }&lt;br /&gt;
 Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest&lt;br /&gt;
&lt;br /&gt;
Same thing, but Exchange 2016 (or probably newer)&lt;br /&gt;
 New-ManagementRoleAssignment –Role “Mailbox Import Export” –User [DOMAIN\username]&lt;br /&gt;
 foreach ($i in (get-mailbox)) { New-MailboxExportRequest -Mailbox $i.Alias -FilePath \\UNCPath\PSTs\$($i.Alias).pst }&lt;br /&gt;
 Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest&lt;br /&gt;
&lt;br /&gt;
Importing all .Pst files in Exchange 2013 or 2016&lt;br /&gt;
&lt;br /&gt;
(don't forget to ensure New-ManagementRoleAssignment has been set if you're working with a different server AND restart Exchange powershell)&lt;br /&gt;
  Dir \\HOSTNAME\e$\PSTs\*.pst | %{ New-MailboxImportRequest -Name RecoveredPST -BatchName Recovered -BadItemLimit 1000000 -AcceptLargeDataLoss -Mailbox $_.BaseName -FilePath $_.FullName}&lt;br /&gt;
 Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest&lt;br /&gt;
&lt;br /&gt;
Same thing, but single maildatabase:&lt;br /&gt;
 New-MailboxImportRequest -Mailbox [Username] -IsArchive -FilePath \\UNCPath\PSTs\filename.pst&lt;br /&gt;
&lt;br /&gt;
==Mailbox Migrations==&lt;br /&gt;
Move Mailbox from one database to another:&lt;br /&gt;
Test it to see if a sigle mailbox is ready to move:&lt;br /&gt;
 New-MoveRequest -identity jhorne -TargetDatabase &amp;quot;DFWLP DEV Mailboxes&amp;quot; -WhatIf&lt;br /&gt;
Then move it: &lt;br /&gt;
 New-MoveRequest -identity jhorne -TargetDatabase &amp;quot;DFWLP DEV Mailboxes&amp;quot;&lt;br /&gt;
Move all Mailboxes: &lt;br /&gt;
 foreach ($i in (Get-Mailbox)) { New-MoveRequest -Identity $i -TargetDatabase &amp;quot;DLP Prod Mailboxes&amp;quot; }&lt;br /&gt;
Move Arbitration, Auditlog, and DiscoverySearch:&lt;br /&gt;
 Get-Mailbox -Arbitration | New-Moverequest -Targetdatabase &amp;quot;Database Name&amp;quot;&lt;br /&gt;
 Get-Mailbox DiscoverySearchMailbox* | New-MoveRequest -TargetDatabase &amp;quot;Database Name&amp;quot;&lt;br /&gt;
 Get-Mailbox -Database DLP-PROD01 -AuditLog | New-MoveRequest -TargetDatabase &amp;quot;Database Name&amp;quot;&lt;br /&gt;
List all mailboxes:&lt;br /&gt;
 Get-mailbox&lt;br /&gt;
List all mailboxes and show current database:&lt;br /&gt;
 Get-Mailbox | fl alias,database&lt;br /&gt;
List current migration jobs:&lt;br /&gt;
 Get-MoveRequest&lt;br /&gt;
 Get-MoveRequestStatistics -Identity username | fl&lt;br /&gt;
 Get-MoveRequestStatistics -Identity username | fl totalmailboxitemcount,bytestransferred,itemstransferred,PercentComplete&lt;br /&gt;
Remove completed migration jobs:&lt;br /&gt;
 Get-MoveRequest -MoveStatus completed | Remove-MoveRequest&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Useful_Linux_Commands</id>
		<title>Useful Linux Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Useful_Linux_Commands"/>
				<updated>2022-05-06T19:34:03Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: /* Useful ways to use Sed in Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Linux]]&lt;br /&gt;
&lt;br /&gt;
==Measure disk i/o performance==&lt;br /&gt;
 dd if=/dev/zero of=outfile bs=1M count=1024 conv=fdatasync; rm -rf outfile&lt;br /&gt;
 dd if=/dev/zero of=outfile bs=1M count=2048 conv=fdatasync; rm -rf outfile&lt;br /&gt;
 dd if=/dev/zero of=outfile bs=1M count=4096 conv=fdatasync; rm -rf outfile&lt;br /&gt;
&lt;br /&gt;
==Refresh disk storage system after adding new disks==&lt;br /&gt;
 for i in `ls /sys/class/scsi_host`; do echo &amp;quot;- - -&amp;quot; &amp;gt; /sys/class/scsi_host/${i}/scan; done&lt;br /&gt;
&lt;br /&gt;
==Useful Random Bash Command Line Usages==&lt;br /&gt;
To find all matching files names in a directory hierarchy&lt;br /&gt;
 find /path/to/dir -type f | rev | sort | sed -nr ':a N;/^([^/]*\/).*\n\1/p;D;ba' | uniq | rev&lt;br /&gt;
&lt;br /&gt;
==Useful ways to use Sed in Linux==&lt;br /&gt;
These first two examples are used in linux installation scripts as %post activities.&lt;br /&gt;
&lt;br /&gt;
To uncomment something in a config file:&lt;br /&gt;
 sed -i 's/^#compress/compress/' /etc/logrotate.conf&lt;br /&gt;
 sed -i 's/^#UseDNS no/UseDNS no/' /etc/ssh/sshd_config&lt;br /&gt;
To remove &amp;quot;rhgb quiet&amp;quot; from grub.conf:&lt;br /&gt;
 sed -i 's/rhgb quiet//g' /boot/grub/grub.conf&lt;br /&gt;
&lt;br /&gt;
Examples from various task scripts which i will categeorize and label later: (some will be repeats)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[root@d0lppb021 syssupport]# grep sed *.sh&lt;br /&gt;
addjhorne.sh:sed -i '/^jhorne/ c\jhorne:yaaaaaaaaaaaaaaaaaaaaaaaaaaaayyyyyyyyyyyyyyyyyyyyyy:0:99999:7:::' /etc/shadow&lt;br /&gt;
filesystem_lv_mysql-vg01-500G-sda.sh:sed -i '/lv_mysql/d' /etc/fstab&lt;br /&gt;
filesystem_lv_postgres-vg01-500G-sda.sh:sed -i '/lv_postgres/d' /etc/fstab&lt;br /&gt;
fixbacula.sh:sed -i &amp;quot;s/set-hostname/$HOSTNAME/g&amp;quot; /etc/bacula/bacula-fd.conf&lt;br /&gt;
fixpostfix.sh:sed -i &amp;quot;s/^#myhostname = virtual.domain.tld/myhostname = $HOSTNAME.skopos.me/g&amp;quot; /etc/postfix/main.cf&lt;br /&gt;
fixpostfix.sh:sed -i 's/^#mydomain = domain.tld/mydomain = skopos.us/' /etc/postfix/main.cf&lt;br /&gt;
fixpostfix.sh:sed -i 's/^#myorigin = $mydomain/myorigin = $mydomain/' /etc/postfix/main.cf&lt;br /&gt;
initialovirt.sh:sed -i 's/Santiago//g' /etc/redhat-release&lt;br /&gt;
initialovirt.sh:sed -i &amp;quot;s/set-hostname/$HOSTNAME/g&amp;quot; /etc/bacula/bacula-fd.conf&lt;br /&gt;
initialphysical.sh:sed -i 's/Santiago//g' /etc/redhat-release&lt;br /&gt;
initialphysical.sh:sed -i &amp;quot;s/set-hostname/$HOSTNAME/g&amp;quot; /etc/bacula/bacula-fd.conf&lt;br /&gt;
initialpxe.sh:sed -i &amp;quot;s/set-hostname/$HOSTNAME/g&amp;quot; /etc/bacula/bacula-fd.conf&lt;br /&gt;
initialvirtual.sh:sed -i &amp;quot;s/set-hostname/$HOSTNAME/g&amp;quot; /etc/bacula/bacula-fd.conf&lt;br /&gt;
readyesno.sh:        [Yy]* ) umount /opt/mysql; pvcreate /dev/sda1; vgcreate vg01 /dev/sda1; lvcreate -L 500G -n lv_mysql vg01; mkfs.ext4 /dev/vg01/lv_mysql; sed -i '/lv_mysql/d' /etc/fstab; echo &amp;quot;/dev/mapper/vg01-lv_mysql /opt/mysql              ext4    defaults,_netdev 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab; cat /etc/fstab; mount -a; df -h; break;;&lt;br /&gt;
setupssl.sh:sed -i &amp;quot;s/localhost.crt/skopos.me.crt/g&amp;quot; /etc/httpd/conf.d/ssl.conf&lt;br /&gt;
setupssl.sh:sed -i &amp;quot;s/localhost.key/skopos.me.key/g&amp;quot; /etc/httpd/conf.d/ssl.conf&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example is from to change a PXE profile file, to add ksdevice parameter:&lt;br /&gt;
 sed -i 's/^    append initrd/    append ksdevice=em1 nicdelay=50 linksleep=50 initrd/' /tftpboot/linux-install/pxelinux.cfg/0*&lt;br /&gt;
&lt;br /&gt;
==Yum Configuration to Skip a Package==&lt;br /&gt;
I have had a problem with Fedora overwriting the respository version of Cacti with the source version that I had previously installed.  To prevent yum from updating a specific package, I have found this switch:&lt;br /&gt;
 yum -y update --exclude=cacti&lt;br /&gt;
There is also a facility to handle this directly, from within /etc/yum/yum.conf.&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2022-02-17T13:25:39Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Locate AD Account Lockout Events (must run this powershell on the PDC Emulator)&lt;br /&gt;
 get-addomain | select PDCEmulator&lt;br /&gt;
 Get-WinEvent -FilterHashtable @{logname='security'; id=4740} | fl&lt;br /&gt;
Create new DNS record&lt;br /&gt;
 Add-DnsServerResourceRecordA -Name hostname -ZoneName fqdn.domain.com -IPv4Address 192.168.99.21&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Install Standard File and Print Services&lt;br /&gt;
 Install-WindowsFeature Print-Services, Print-Server, FS-FileServer, FS-Resource-Manager -IncludeManagementTools&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Check or Relocate Domain FSMO Roles&lt;br /&gt;
 Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator&lt;br /&gt;
 Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster&lt;br /&gt;
 Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -Identity SERVERNAME -OperationMasterRole 0,1,2,3,4&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Search Event Logs about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Search Event Logs about IP Conflict events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;4199&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
Export and Import Network Shares&lt;br /&gt;
 reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
 reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2022-02-14T16:32:37Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Create new DNS record&lt;br /&gt;
 Add-DnsServerResourceRecordA -Name hostname -ZoneName fqdn.domain.com -IPv4Address 192.168.99.21&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Install Standard File and Print Services&lt;br /&gt;
 Install-WindowsFeature Print-Services, Print-Server, FS-FileServer, FS-Resource-Manager -IncludeManagementTools&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Check or Relocate Domain FSMO Roles&lt;br /&gt;
 Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator&lt;br /&gt;
 Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster&lt;br /&gt;
 Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -Identity SERVERNAME -OperationMasterRole 0,1,2,3,4&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Search Event Logs about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Search Event Logs about IP Conflict events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;4199&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
Export and Import Network Shares&lt;br /&gt;
 reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
 reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/AzureAD_Powershell_Install</id>
		<title>AzureAD Powershell Install</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/AzureAD_Powershell_Install"/>
				<updated>2022-01-06T17:39:18Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Created page with &amp;quot;Category:Azure  Install-ModuleAzureAD   Connect-AzureAD -TenantId id-from-portal&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Azure]]&lt;br /&gt;
 Install-ModuleAzureAD&lt;br /&gt;
&lt;br /&gt;
 Connect-AzureAD -TenantId id-from-portal&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/AzureAD_Set_User_Password_Expiration</id>
		<title>AzureAD Set User Password Expiration</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/AzureAD_Set_User_Password_Expiration"/>
				<updated>2022-01-06T17:38:39Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Azure]]&lt;br /&gt;
 Get-AzureADUser -ObjectId UPN | Select-Object UserprincipalName,@{N=&amp;quot;PasswordNeverExpires&amp;quot;;E={$_.PasswordPolicies -contains &amp;quot;DisablePasswordExpiration&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
 Set-AzureADUser -ObjectId UPN -PasswordPolicies DisablePasswordExpiration&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/AzureAD_Set_User_Password_Expiration</id>
		<title>AzureAD Set User Password Expiration</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/AzureAD_Set_User_Password_Expiration"/>
				<updated>2022-01-06T17:38:19Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Created page with &amp;quot; Get-AzureADUser -ObjectId UPN | Select-Object UserprincipalName,@{N=&amp;quot;PasswordNeverExpires&amp;quot;;E={$_.PasswordPolicies -contains &amp;quot;DisablePasswordExpiration&amp;quot;}}   Set-AzureADUser -O...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; Get-AzureADUser -ObjectId UPN | Select-Object UserprincipalName,@{N=&amp;quot;PasswordNeverExpires&amp;quot;;E={$_.PasswordPolicies -contains &amp;quot;DisablePasswordExpiration&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
 Set-AzureADUser -ObjectId UPN -PasswordPolicies DisablePasswordExpiration&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Category:Azure</id>
		<title>Category:Azure</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Category:Azure"/>
				<updated>2022-01-06T17:37:20Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Category:Azure</id>
		<title>Category:Azure</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Category:Azure"/>
				<updated>2022-01-06T17:37:13Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Created page with &amp;quot;.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;.&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Office365_User_Identity_Management</id>
		<title>Office365 User Identity Management</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Office365_User_Identity_Management"/>
				<updated>2022-01-06T17:37:01Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Azure]]&lt;br /&gt;
==Setting a User to have NonExpiring Password==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
Connect-MSOLService&lt;br /&gt;
Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires&lt;br /&gt;
Get-MSOLUser -UserPrincipalName alias | Select PasswordNeverExpires&lt;br /&gt;
Set-MSOLUser -UserPrincipalName alias -PasswordNeverExpires $true&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Main_Page"/>
				<updated>2022-01-06T17:36:44Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: /* Areas of Interest */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;'''Welcome to DFWLPiki!'''&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Areas of Interest==&lt;br /&gt;
&lt;br /&gt;
'''[[:Category:Azure|Azure]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Exchange|Exchange]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Windows|Windows]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Database|Database]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Linux|Linux]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:FreeBSD|FreeBSD]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Storage|Storage]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Backups and Data Recovery|Backups and Data Recovery]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Networking|Networking]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:VMWare|VMWare]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Dell Servers|Dell Servers]]'''&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Install_RSAT_Tools_on_Windows_10</id>
		<title>Install RSAT Tools on Windows 10</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Install_RSAT_Tools_on_Windows_10"/>
				<updated>2021-11-18T15:09:48Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:windows]]&lt;br /&gt;
&lt;br /&gt;
First, Verify your current RSAT tools state.  Verify again after your install process is completed.  Open powershell as administrator and type:&lt;br /&gt;
&lt;br /&gt;
 Get-WindowsCapability -Name RSAT* -Online | Select-Object -Property DisplayName, State&lt;br /&gt;
&lt;br /&gt;
This script will temporarily disable using WSUS settings as update source and switch to online.  After completion, it switches back to WSUS Source.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;$currentWU = Get-ItemProperty -Path “HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU” -Name “UseWUServer” | select -ExpandProperty UseWUServer&lt;br /&gt;
Set-ItemProperty -Path “HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU” -Name “UseWUServer” -Value 0&lt;br /&gt;
Restart-Service wuauserv&lt;br /&gt;
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability –Online&lt;br /&gt;
Set-ItemProperty -Path “HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU” -Name “UseWUServer” -Value $currentWU&lt;br /&gt;
Restart-Service wuauserv&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No idea why WSUS Feature on Demand isnt working, but it is what it is.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Also doesnt hurt to verify that your WSUS setting got set back to 1:&lt;br /&gt;
 Get-ItemProperty -Path “HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU” -Name “UseWUServer”&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/TaskManager_Doesnt_Show_Disk_Statistics</id>
		<title>TaskManager Doesnt Show Disk Statistics</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/TaskManager_Doesnt_Show_Disk_Statistics"/>
				<updated>2021-11-10T17:22:22Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Created page with &amp;quot;To cause windows task manager to show objects/graphs for disk performance, run from administrator command promt:  diskperf -y Category:Windows&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To cause windows task manager to show objects/graphs for disk performance, run from administrator command promt:&lt;br /&gt;
 diskperf -y&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Category:Dell_Servers</id>
		<title>Category:Dell Servers</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Category:Dell_Servers"/>
				<updated>2021-11-10T17:13:57Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Category:Dell_Servers</id>
		<title>Category:Dell Servers</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Category:Dell_Servers"/>
				<updated>2021-11-10T17:12:15Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Created page with &amp;quot;.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;.&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag</id>
		<title>Dell OMSA Non-Certified Drive Flag</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag"/>
				<updated>2021-11-10T17:11:47Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Dell Servers]]&lt;br /&gt;
Turn off non-certified disk alert in OpenManage:&lt;br /&gt;
&lt;br /&gt;
Esxi&lt;br /&gt;
 /etc/cim/dell/srvadmin/srvadmin-storage/stsvc.ini&lt;br /&gt;
Windows&lt;br /&gt;
 C:\Program Files\Dell\SysMgt\sm\stsvc.ini&lt;br /&gt;
&lt;br /&gt;
Loate the below line, it is generally near the top.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
; nonDellCertified flag for blocking all non-dell certified alerts.&lt;br /&gt;
NonDellCertifiedFlag=yes &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change to no.  Restart OpenManage services.&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag</id>
		<title>Dell OMSA Non-Certified Drive Flag</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag"/>
				<updated>2021-11-10T17:10:03Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Turn off non-certified disk alert in OpenManage:&lt;br /&gt;
&lt;br /&gt;
Esxi&lt;br /&gt;
 /etc/cim/dell/srvadmin/srvadmin-storage/stsvc.ini&lt;br /&gt;
Windows&lt;br /&gt;
 C:\Program Files\Dell\SysMgt\sm\stsvc.ini&lt;br /&gt;
&lt;br /&gt;
Loate the below line, it is generally near the top.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
; nonDellCertified flag for blocking all non-dell certified alerts.&lt;br /&gt;
NonDellCertifiedFlag=yes &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change to no.  Restart OpenManage services.&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Main_Page"/>
				<updated>2021-11-10T17:09:48Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: /* Areas of Interest */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;'''Welcome to DFWLPiki!'''&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Areas of Interest==&lt;br /&gt;
&lt;br /&gt;
'''[[:Category:Exchange|Exchange]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Windows|Windows]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Database|Database]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Linux|Linux]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:FreeBSD|FreeBSD]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Storage|Storage]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Backups and Data Recovery|Backups and Data Recovery]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Networking|Networking]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:VMWare|VMWare]]'''&amp;lt;br /&amp;gt;&lt;br /&gt;
'''[[:Category:Dell Servers|Dell Servers]]'''&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2021-10-17T23:36:31Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Create new DNS record&lt;br /&gt;
 Add-DnsServerResourceRecordA -Name hostname -ZoneName fqdn.domain.com -IPv4Address 192.168.99.21&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Install Standard File and Print Services&lt;br /&gt;
 Install-WindowsFeature Print-Services, Print-Server, FS-FileServer, FS-Resource-Manager -IncludeManagementTools&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Check or Relocate Domain FSMO Roles&lt;br /&gt;
 Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator&lt;br /&gt;
 Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster&lt;br /&gt;
 Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -Identity SERVERNAME -OperationMasterRole 0,1,2,3,4&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Find out about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
Export and Import Network Shares&lt;br /&gt;
 reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
 reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Update_Powershell_Commands</id>
		<title>Windows Update Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Update_Powershell_Commands"/>
				<updated>2021-09-25T15:14:21Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
'''The PSWindowsUpdate set of commands is required.'''&lt;br /&gt;
If necessary, remove the older module with admin command promt:&lt;br /&gt;
 @RD /S /Q  C:\windows\system32\WindowsPowerShell\v1.0\Modules\PSWindowsUpdate\&lt;br /&gt;
&lt;br /&gt;
Install the PSWindowsUpdate module and install all available windows updates:&lt;br /&gt;
 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12&lt;br /&gt;
 Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force&lt;br /&gt;
 Install-Module -Name PSWindowsUpdate -Confirm:$false -Force&lt;br /&gt;
 Install-WindowsUpdate -AcceptAll -AutoReboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apply all available updates:&lt;br /&gt;
 Install-WindowsUpdate -AcceptAll&lt;br /&gt;
or&lt;br /&gt;
 Install-WindowsUpdate -AcceptAll -AutoReboot&lt;br /&gt;
&lt;br /&gt;
List all available updates&lt;br /&gt;
 Get-WindowsUpdate&lt;br /&gt;
&lt;br /&gt;
Show current update settings, including WSUS source server if any:&lt;br /&gt;
 Get-WUSettings&lt;br /&gt;
&lt;br /&gt;
Show Updates sources and which is default (Desired state is usually &amp;quot;true&amp;quot; for Windows Server Update Service)&lt;br /&gt;
 Get-WUServiceManager&lt;br /&gt;
&lt;br /&gt;
Show all available commands:&lt;br /&gt;
 Get-Command -module PSWindowsUpdate&lt;br /&gt;
&lt;br /&gt;
For servers older than 2016, you may need to update to powershell 5.1 first:&lt;br /&gt;
 https://www.microsoft.com/en-us/download/details.aspx?id=54616&lt;br /&gt;
&lt;br /&gt;
Here is converting from old module to new all in one shot:&lt;br /&gt;
 @RD /S /Q  C:\windows\system32\WindowsPowerShell\v1.0\Modules\PSWindowsUpdate\&lt;br /&gt;
 powershell&lt;br /&gt;
 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12&lt;br /&gt;
 Install-Module -Name PSWindowsUpdate -Confirm:$false -Force&lt;br /&gt;
 Install-WindowsUpdate -AcceptAll&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Update_Powershell_Commands</id>
		<title>Windows Update Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Update_Powershell_Commands"/>
				<updated>2021-09-25T15:14:02Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
'''The PSWindowsUpdate set of commands is required.'''&lt;br /&gt;
If necessary, remove the older module with admin command promt:&lt;br /&gt;
 @RD /S /Q  C:\windows\system32\WindowsPowerShell\v1.0\Modules\PSWindowsUpdate\&lt;br /&gt;
&lt;br /&gt;
Install the PSWindowsUpdate module:&lt;br /&gt;
 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12&lt;br /&gt;
 Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force&lt;br /&gt;
 Install-Module -Name PSWindowsUpdate -Confirm:$false -Force&lt;br /&gt;
 Install-WindowsUpdate -AcceptAll -AutoReboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apply all available updates:&lt;br /&gt;
 Install-WindowsUpdate -AcceptAll&lt;br /&gt;
or&lt;br /&gt;
 Install-WindowsUpdate -AcceptAll -AutoReboot&lt;br /&gt;
&lt;br /&gt;
List all available updates&lt;br /&gt;
 Get-WindowsUpdate&lt;br /&gt;
&lt;br /&gt;
Show current update settings, including WSUS source server if any:&lt;br /&gt;
 Get-WUSettings&lt;br /&gt;
&lt;br /&gt;
Show Updates sources and which is default (Desired state is usually &amp;quot;true&amp;quot; for Windows Server Update Service)&lt;br /&gt;
 Get-WUServiceManager&lt;br /&gt;
&lt;br /&gt;
Show all available commands:&lt;br /&gt;
 Get-Command -module PSWindowsUpdate&lt;br /&gt;
&lt;br /&gt;
For servers older than 2016, you may need to update to powershell 5.1 first:&lt;br /&gt;
 https://www.microsoft.com/en-us/download/details.aspx?id=54616&lt;br /&gt;
&lt;br /&gt;
Here is converting from old module to new all in one shot:&lt;br /&gt;
 @RD /S /Q  C:\windows\system32\WindowsPowerShell\v1.0\Modules\PSWindowsUpdate\&lt;br /&gt;
 powershell&lt;br /&gt;
 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12&lt;br /&gt;
 Install-Module -Name PSWindowsUpdate -Confirm:$false -Force&lt;br /&gt;
 Install-WindowsUpdate -AcceptAll&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2021-08-20T12:37:02Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Install Standard File and Print Services&lt;br /&gt;
 Install-WindowsFeature Print-Services, Print-Server, FS-FileServer, FS-Resource-Manager -IncludeManagementTools&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Check or Relocate Domain FSMO Roles&lt;br /&gt;
 Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator&lt;br /&gt;
 Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster&lt;br /&gt;
 Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -Identity SERVERNAME -OperationMasterRole 0,1,2,3,4&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Find out about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
Export and Import Network Shares&lt;br /&gt;
 reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
 reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2021-08-20T12:15:19Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Install Standard File and Print Services&lt;br /&gt;
 Install-WindowsFeature Print-Services, Print-Server, FS-FileServer, FS-Resource-Manager -IncludeManagementTools&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Relocating Domain FSMO Roles&lt;br /&gt;
 Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator&lt;br /&gt;
 Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster&lt;br /&gt;
 Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -Identity SERVERNAME -OperationMasterRole 0,1,2,3,4&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Find out about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
Export and Import Network Shares&lt;br /&gt;
 reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
 reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2021-08-17T23:25:04Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Install Standard File and Print Services&lt;br /&gt;
 Install-WindowsFeature Print-Services, Print-Server, FS-FileServer, FS-Resource-Manager -IncludeManagementTools&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-Computer -ComputerName&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Relocating Domain FSMO Roles&lt;br /&gt;
 Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator&lt;br /&gt;
 Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster&lt;br /&gt;
 Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -Identity SERVERNAME -OperationMasterRole 0,1,2,3,4&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Removing a computer object from the AD&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Find out about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
Export and Import Network Shares&lt;br /&gt;
 reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
 reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2021-06-22T23:52:42Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-Computer -ComputerName&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Relocating Domain FSMO Roles&lt;br /&gt;
 Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator&lt;br /&gt;
 Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster&lt;br /&gt;
 Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Format-Table -AutoSize&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -Identity SERVERNAME -OperationMasterRole 0,1,2,3,4&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Removing a computer object from the AD&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Find out about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
Export and Import Network Shares&lt;br /&gt;
 reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
 reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Main_Page"/>
				<updated>2021-06-22T00:53:16Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;'''Welcome to DFWLPiki!'''&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Areas of Interest==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Master container --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-width:900px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- Left two thirds container --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:590px;float:left;margin:0 10px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Left column --&amp;gt;&lt;br /&gt;
  &amp;lt;div style=&amp;quot;width:250px;float:left;margin:0 10px;&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Exchange|Exchange]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Windows|Windows]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Database|Database]]'''&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Weather|Weather]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Center column --&amp;gt;&lt;br /&gt;
  &amp;lt;div style=&amp;quot;width:250px;float:right;margin:0 10px&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Linux|Linux]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:FreeBSD|FreeBSD]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Storage|Storage]]'''&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Right column --&amp;gt;&lt;br /&gt;
  &amp;lt;div style=&amp;quot;width:250px;float:left;margin:0 10px&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Backups and Data Recovery|Backups and Data Recovery]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Networking|Networking]]'''&amp;lt;br /&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:VMWare|VMWare]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Clearing_CBS_Logs</id>
		<title>Clearing CBS Logs</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Clearing_CBS_Logs"/>
				<updated>2021-06-22T00:48:46Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Created page with &amp;quot;category:Windows ==Clearing CBS Logs when they are too large==  Stop-Service TrustedInstaller  Remove-Item -Path C:\Windows\Logs\CBS\*.*  Start-Service TrustedInstaller&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Windows]]&lt;br /&gt;
==Clearing CBS Logs when they are too large==&lt;br /&gt;
 Stop-Service TrustedInstaller&lt;br /&gt;
 Remove-Item -Path C:\Windows\Logs\CBS\*.*&lt;br /&gt;
 Start-Service TrustedInstaller&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag</id>
		<title>Dell OMSA Non-Certified Drive Flag</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag"/>
				<updated>2021-06-20T13:06:47Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Dell Servers]]&lt;br /&gt;
Turn off non-certified disk alert in OpenManage:&lt;br /&gt;
&lt;br /&gt;
Esxi&lt;br /&gt;
 /etc/cim/dell/srvadmin/srvadmin-storage/stsvc.ini&lt;br /&gt;
Windows&lt;br /&gt;
 C:\Program Files\Dell\SysMgt\sm\stsvc.ini&lt;br /&gt;
&lt;br /&gt;
Loate the below line, it is generally near the top.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
; nonDellCertified flag for blocking all non-dell certified alerts.&lt;br /&gt;
NonDellCertifiedFlag=yes &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change to no.  Restart OpenManage services.&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Main_Page</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Main_Page"/>
				<updated>2021-06-20T13:05:30Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: /* Areas of Interest */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;big&amp;gt;'''Welcome to DFWLPiki!'''&amp;lt;/big&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Areas of Interest==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Master container --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;min-width:900px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- Left two thirds container --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:590px;float:left;margin:0 10px;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Left column --&amp;gt;&lt;br /&gt;
  &amp;lt;div style=&amp;quot;width:250px;float:left;margin:0 10px;&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Exchange|Exchange]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Windows|Windows]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Database|Database]]'''&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Dell Servers|Dell Servers]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Center column --&amp;gt;&lt;br /&gt;
  &amp;lt;div style=&amp;quot;width:250px;float:right;margin:0 10px&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Linux|Linux]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:FreeBSD|FreeBSD]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Storage|Storage]]'''&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Right column --&amp;gt;&lt;br /&gt;
  &amp;lt;div style=&amp;quot;width:250px;float:left;margin:0 10px&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Backups and Data Recovery|Backups and Data Recovery]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:Networking|Networking]]'''&amp;lt;br /&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
    &amp;lt;div style=&amp;quot;margin:10px 0;&amp;quot;&amp;gt;'''[[:Category:VMWare|VMWare]]'''&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/ESXi_Command_Line_Tools</id>
		<title>ESXi Command Line Tools</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/ESXi_Command_Line_Tools"/>
				<updated>2021-06-17T12:16:17Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:VMWare]]&lt;br /&gt;
==Scope of This Document==&lt;br /&gt;
I keep forgetting the command line syntax for ESXi console, so I document the commands I use most often here, hopefully so they will eventually be committed to memory... if not I know where to quickly find them now.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Note that this document assumes you have Enabled SSH Techsupport mode.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting driver versions on ESXi Host==&lt;br /&gt;
&lt;br /&gt;
Get a list of all nics in the host&lt;br /&gt;
 esxcli network nic list&lt;br /&gt;
Show what version a specific driver is currently running or loading at bootup&lt;br /&gt;
 vmkload_mod -s DRIVER | grep Version&lt;br /&gt;
Get vendor information about a Device that can be cross-checked on the ESXi HCL&lt;br /&gt;
 vmkchdev -l | grep DEVICENAME&lt;br /&gt;
&lt;br /&gt;
==Install Dell OpenManage agent on ESXi Host==&lt;br /&gt;
 esxcli software vib install -d /vmfs/volumes/SAS_RAID6/PATCH/OM-SrvAdmin-Dell-Web-8.5.0-2372.VIB-ESX60i_A00.zip&amp;lt;br&amp;gt;&lt;br /&gt;
 esxcli software vib list | grep Dell&lt;br /&gt;
&lt;br /&gt;
==Specifying the Default iSCSI Multipathing Mode==&lt;br /&gt;
For Synology:&lt;br /&gt;
For Equallogic:&lt;br /&gt;
For Compellent:&lt;br /&gt;
 esxcli storage nmp satp set --default-psp=VMW_PSP_RR --satp=VMW_SATP_ALUA &lt;br /&gt;
 esxcli storage nmp satp set --default-psp=VMW_PSP_RR --satp=VMW_SATP_EQL&lt;br /&gt;
 esxcli storage nmp satp set --default-psp=VMW_PSP_RR --satp=VMW_SATP_DEFAULT_AA&lt;br /&gt;
&lt;br /&gt;
==VMWare ESXi Commands For Managing Guests==&lt;br /&gt;
The main command is 'vim-cmd'.  It has many uses via its subcommands and switches.&lt;br /&gt;
&lt;br /&gt;
To get a list of all VM guests on a host, use:&lt;br /&gt;
&lt;br /&gt;
 vim-cmd vmsvc/getallvms&lt;br /&gt;
&lt;br /&gt;
this will print a list of all VMs, their Vmid, common names, VM Guest OS, and file system locaion of the .vmx configuration file.&lt;br /&gt;
&lt;br /&gt;
From that output, you take the Vmid of the host you want to manage, and check its power state like this:&lt;br /&gt;
&lt;br /&gt;
 vim-cmd vmsvc/power.getstate 2&lt;br /&gt;
&lt;br /&gt;
The options for managing the power state of a guest VM are:&lt;br /&gt;
&lt;br /&gt;
 power.getstate                   &lt;br /&gt;
 power.hibernate                  &lt;br /&gt;
 power.off                        &lt;br /&gt;
 power.on                         &lt;br /&gt;
 power.reboot                     &lt;br /&gt;
 power.reset                      &lt;br /&gt;
 power.shutdown                   &lt;br /&gt;
 power.suspend                    &lt;br /&gt;
 power.suspendResume&lt;br /&gt;
&lt;br /&gt;
To give a VM the command to gracefully shutdown, use:&lt;br /&gt;
&lt;br /&gt;
 vim-cmd vmsvc/power.shutdown 2&lt;br /&gt;
==Get status of vmdk disk consolidation tasks==&lt;br /&gt;
 vim-cmd vimsvc/task_list&lt;br /&gt;
 vim-cmd vimsvc/task_info haTask-31-vim.VirtualMachine.removeAllSnapshots-905604163&lt;br /&gt;
==Moving .vmdk Files From Store to Store, Retain Thin Format==&lt;br /&gt;
&lt;br /&gt;
Power the VM Guest off.  Remove from ESXi inventory.&lt;br /&gt;
&lt;br /&gt;
Convert the vmdk file to thin:&amp;lt;br&amp;gt;&lt;br /&gt;
 vmkfstools -i SERVERNAME.vmdk -d thin SERVERNAME-thin.vmdk&lt;br /&gt;
&lt;br /&gt;
Add the VM Guest back to inventory, and power on.  Save the original disk file for just in case.  After the system boots successfully, remove the thick vmdk file.&lt;br /&gt;
&lt;br /&gt;
'''UPDATE''' - I have since found, that on the free version, if you create a target folder in the target file system, and then copy the contents of the actual Host folder (not the host folder itself), then the thin state will copy with the file.  The above re-thining of the disk, was due to when copying the entire host folder, the disk would copy to thick format in the destination file system. One extra step, to pre-create the destination folder, but it saves a heck of a lot of time later when you dont have to re-thin several hundred gigs of vmdk files.  :)&lt;br /&gt;
&lt;br /&gt;
==Configuration Backup and Restore of a Single Host==&lt;br /&gt;
Syncronize all settings:&lt;br /&gt;
 vim-cmd hostsvc/firmware/sync_config&lt;br /&gt;
Dump all the settings:&lt;br /&gt;
 vim-cmd hostsvc/firmware/backup_config&lt;br /&gt;
Upon completion, the host will print out:&lt;br /&gt;
 Bundle can be downloaded at : http://*/downloads/configBundle-[FQDN].tgz.  &lt;br /&gt;
Enter the URL into a browser and substitute in the FQDN for the * and download the file to your system.&lt;br /&gt;
&lt;br /&gt;
To restore from a previously saved config, scp the backup file from your system to the host, move it to the /tmp folder, and rename the file to configBundle.tgz.&lt;br /&gt;
 mv configBundle-[FQDN].tgz /tmp/configBundle.tgz&lt;br /&gt;
&lt;br /&gt;
Put the host in maintenance mode.&lt;br /&gt;
 vim-cmd hostsvc/maintenance_mode_enter&lt;br /&gt;
&lt;br /&gt;
Restore the previous configuration.&lt;br /&gt;
 vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz&lt;br /&gt;
&lt;br /&gt;
Upon completion of the reload, the host will reboot.  Note, that if you rebuild the ESXi server, you will need to reinstall the same version, or patch up to the version that was running when the config dump was made.&lt;br /&gt;
&lt;br /&gt;
==Migrate a VM From One Host to Another==&lt;br /&gt;
note: ensure that the VM that is being moved does not have any .iso file mounted to the cdrom drive. ie... anything it cannot take with it in the migration.&lt;br /&gt;
&lt;br /&gt;
note also: if youre are moving a RHEL6 system, it would be helpful to remove the /etc/udev/rules.d/70-persistent-net.rules before you do the final shutdown on the VM you are going to move.&lt;br /&gt;
&lt;br /&gt;
 ovftool -ds=DEST-DATASTORE vi://root@SOURCE-ESXi/VMNAME vi://root@DEST-ESXi&lt;br /&gt;
&lt;br /&gt;
==Updating the Hypervisor Using Command Line==&lt;br /&gt;
Search the profile list and grep by the version and year you need to pull from:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 esxcli software sources profile list --depot=https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml|grep ESXi-6.5.0-2019&lt;br /&gt;
 esxcli software sources profile list --depot=https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml|grep ESXi-6.7.0-2019&lt;br /&gt;
 esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p PROFILE-NAME-UPDATING-TO&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Killing a stuck VM==&lt;br /&gt;
 esxcli vm process list&lt;br /&gt;
 esxcli vm process kill --type=force --world-id=10561&lt;br /&gt;
&lt;br /&gt;
==Setting SNMP==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;esxcli system snmp set -c mycomunity&lt;br /&gt;
esxcli system snmp set -l warning&lt;br /&gt;
esxcli system snmp set -e yes&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SSH keys==&lt;br /&gt;
SSH keys should be placed here:&lt;br /&gt;
 /etc/ssh/keys-root/authorized_keys&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Exchange_Powershell_Administration_Commands</id>
		<title>Exchange Powershell Administration Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Exchange_Powershell_Administration_Commands"/>
				<updated>2021-06-17T11:08:37Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Exchange]]&lt;br /&gt;
Start all Exchange services after a problematic reboot&lt;br /&gt;
 Get-Service *Exchange* -Exclude *POP*,*IMAP*,*Hyper-V* | Start-Service&lt;br /&gt;
After removing a node from a DAG, sometimes the cluster objects are still hanging around in server manager even though they are already decommissioned or deleted&lt;br /&gt;
 cluster node SERVERNAME /forcecleanup&lt;br /&gt;
Uninstall Exchange on Windows Server Core&lt;br /&gt;
 cd 'C:\Program Files\Microsoft\Exchange Server\V15\Bin\'&lt;br /&gt;
 exsetupui.exe -mode:uninstall&lt;br /&gt;
Node complains that is still a member of a DAG during uninstall&lt;br /&gt;
 Clear-ClusterNode HOSTNAME &lt;br /&gt;
&lt;br /&gt;
Database Management&lt;br /&gt;
 Get-MailboxDatabaseCopyStatus * | ft -auto&lt;br /&gt;
 Get-MailboxDatabaseCopyStatus * -Active | Select Name,Status,MailboxServer,ActivationPreference,ContentIndexState&lt;br /&gt;
&lt;br /&gt;
Display current running exchange version on all servers:&lt;br /&gt;
 Get-ExchangeServer|Format-List name, edition, admindisplayversion, serverrole, site&lt;br /&gt;
&lt;br /&gt;
and source link for what different versions numbers are:&lt;br /&gt;
 http://technet.microsoft.com/en-us/library/hh135098(v=exchg.150).aspx&lt;br /&gt;
&lt;br /&gt;
Show all mailboxes and their current size and usage status:&lt;br /&gt;
 Get-MailboxStatistics | where {$_.ObjectClass –eq “Mailbox”} | Sort-Object TotalItemSize –Descending | ft @{label=”User”;expression={$_.DisplayName}},@{label=”Total Size (MB)”;expression={$_.TotalItemSize.Value.ToMB()}},@{label=”Items”;expression={$_.ItemCount}},@{label=”Storage Limit”;expression={$_.StorageLimitStatus}} -auto&lt;br /&gt;
Or same thing, but Exchange 2019&lt;br /&gt;
 Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object DisplayName,TotalItemSize&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Ubuntu_Server_Set_Static_IP_Address</id>
		<title>Ubuntu Server Set Static IP Address</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Ubuntu_Server_Set_Static_IP_Address"/>
				<updated>2021-06-14T20:17:08Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Created page with &amp;quot;Category:Linux In order to change from DHCP to static IP address, edit the contents of /etc/netplan/00-installer-config.yaml   &amp;lt;nowiki&amp;gt; # This is the network config writte...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Linux]]&lt;br /&gt;
In order to change from DHCP to static IP address, edit the contents of /etc/netplan/00-installer-config.yaml&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
# This is the network config written by 'subiquity'&lt;br /&gt;
network:&lt;br /&gt;
  ethernets:&lt;br /&gt;
    ens160:&lt;br /&gt;
      dhcp4: no&lt;br /&gt;
      addresses: [10.128.20.41/24]&lt;br /&gt;
      gateway4: 10.128.20.1&lt;br /&gt;
      nameservers:&lt;br /&gt;
        addresses: [10.128.20.21, 10.128.20.22]&lt;br /&gt;
  version: 2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
svae the file, and do:&lt;br /&gt;
&lt;br /&gt;
 netplan apply&lt;br /&gt;
&lt;br /&gt;
or reboot the server.&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Ubuntu_Renaming_a_Cloned_Virtual_Machine</id>
		<title>Ubuntu Renaming a Cloned Virtual Machine</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Ubuntu_Renaming_a_Cloned_Virtual_Machine"/>
				<updated>2021-06-14T12:46:14Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Linux]]&lt;br /&gt;
Commands to rename/re-id a cloned ubuntu virtual machine: (replace &amp;quot;newhostname&amp;quot; with the proper new system hostname)&lt;br /&gt;
&lt;br /&gt;
 sudo su -&lt;br /&gt;
 rm /etc/machine-id&lt;br /&gt;
 systemd-machine-id-setup&lt;br /&gt;
 echo newhostname &amp;gt; /etc/hostname&lt;br /&gt;
 reboot&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Ubuntu_Renaming_a_Cloned_Virtual_Machine</id>
		<title>Ubuntu Renaming a Cloned Virtual Machine</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Ubuntu_Renaming_a_Cloned_Virtual_Machine"/>
				<updated>2021-06-13T13:47:15Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Commands to rename/re-id a cloned ubuntu virtual machine: (replace &amp;quot;newhostname&amp;quot; with the proper new system hostname)&lt;br /&gt;
&lt;br /&gt;
 sudo su -&lt;br /&gt;
 rm /etc/machine-id&lt;br /&gt;
 systemd-machine-id-setup&lt;br /&gt;
 echo newhostname &amp;gt; /etc/hostname&lt;br /&gt;
 reboot&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Ubuntu_Renaming_a_Cloned_Virtual_Machine</id>
		<title>Ubuntu Renaming a Cloned Virtual Machine</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Ubuntu_Renaming_a_Cloned_Virtual_Machine"/>
				<updated>2021-06-13T13:46:45Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Created page with &amp;quot;Commands to rename/re-id a cloned ubuntu virtual machine:   sudo su -  rm /etc/machine-id  systemd-machine-id-setup  echo newhostname &amp;gt; /etc/hostname  reboot&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Commands to rename/re-id a cloned ubuntu virtual machine:&lt;br /&gt;
&lt;br /&gt;
 sudo su -&lt;br /&gt;
 rm /etc/machine-id&lt;br /&gt;
 systemd-machine-id-setup&lt;br /&gt;
 echo newhostname &amp;gt; /etc/hostname&lt;br /&gt;
 reboot&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2021-06-08T18:32:38Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-Computer -ComputerName&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Relocating Domain FSMO Roles&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -Identity SERVERNAME -OperationMasterRole 0,1,2,3,4&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Removing a computer object from the AD&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Find out about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
Export and Import Network Shares&lt;br /&gt;
 reg export HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
 reg import HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares %UserProfile%\Desktop\Shares-Backup.reg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Exchange_Powershell_Administration_Commands</id>
		<title>Exchange Powershell Administration Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Exchange_Powershell_Administration_Commands"/>
				<updated>2021-06-06T14:06:58Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Exchange]]&lt;br /&gt;
Start all Exchange services after a problematic reboot&lt;br /&gt;
 Get-Service *Exchange* -Exclude *POP*,*IMAP* | Start-Service&lt;br /&gt;
After removing a node from a DAG, sometimes the cluster objects are still hanging around in server manager even though they are already decommissioned or deleted&lt;br /&gt;
 cluster node SERVERNAME /forcecleanup&lt;br /&gt;
Uninstall Exchange on Windows Server Core&lt;br /&gt;
 cd 'C:\Program Files\Microsoft\Exchange Server\V15\Bin\'&lt;br /&gt;
 exsetupui.exe -mode:uninstall&lt;br /&gt;
Node complains that is still a member of a DAG during uninstall&lt;br /&gt;
 Clear-ClusterNode HOSTNAME &lt;br /&gt;
&lt;br /&gt;
Database Management&lt;br /&gt;
 Get-MailboxDatabaseCopyStatus * | ft -auto&lt;br /&gt;
 Get-MailboxDatabaseCopyStatus * -Active | Select Name,Status,MailboxServer,ActivationPreference,ContentIndexState&lt;br /&gt;
&lt;br /&gt;
Display current running exchange version on all servers:&lt;br /&gt;
 Get-ExchangeServer|Format-List name, edition, admindisplayversion, serverrole, site&lt;br /&gt;
&lt;br /&gt;
and source link for what different versions numbers are:&lt;br /&gt;
 http://technet.microsoft.com/en-us/library/hh135098(v=exchg.150).aspx&lt;br /&gt;
&lt;br /&gt;
Show all mailboxes and their current size and usage status:&lt;br /&gt;
 Get-MailboxStatistics | where {$_.ObjectClass –eq “Mailbox”} | Sort-Object TotalItemSize –Descending | ft @{label=”User”;expression={$_.DisplayName}},@{label=”Total Size (MB)”;expression={$_.TotalItemSize.Value.ToMB()}},@{label=”Items”;expression={$_.ItemCount}},@{label=”Storage Limit”;expression={$_.StorageLimitStatus}} -auto&lt;br /&gt;
Or same thing, but Exchange 2019&lt;br /&gt;
 Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | Select-Object DisplayName,TotalItemSize&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag</id>
		<title>Dell OMSA Non-Certified Drive Flag</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Dell_OMSA_Non-Certified_Drive_Flag"/>
				<updated>2021-03-28T14:47:50Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Created page with &amp;quot;Turn off non-certified disk alert in OpenManage:  Esxi  /etc/cim/dell/srvadmin/srvadmin-storage/stsvc.ini Windows  C:\Program Files\Dell\SysMgt\sm\stsvc.ini  Loate the below l...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Turn off non-certified disk alert in OpenManage:&lt;br /&gt;
&lt;br /&gt;
Esxi&lt;br /&gt;
 /etc/cim/dell/srvadmin/srvadmin-storage/stsvc.ini&lt;br /&gt;
Windows&lt;br /&gt;
 C:\Program Files\Dell\SysMgt\sm\stsvc.ini&lt;br /&gt;
&lt;br /&gt;
Loate the below line, it is generally near the top.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
; nonDellCertified flag for blocking all non-dell certified alerts.&lt;br /&gt;
NonDellCertifiedFlag=yes &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change to no.  Restart OpenManage services.&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Set_or_Move_Schema_Master_FSMO_Role</id>
		<title>Set or Move Schema Master FSMO Role</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Set_or_Move_Schema_Master_FSMO_Role"/>
				<updated>2021-03-05T14:32:26Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
The Schema Master MMC tools is not generally visible even if ADMT is installed.  In order to make the Schema Master MMC snap-in appear in the list, you must run&lt;br /&gt;
&lt;br /&gt;
 regsvr32 schmmgmt.dll&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Set_or_Move_Schema_Master_FSMO_Role</id>
		<title>Set or Move Schema Master FSMO Role</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Set_or_Move_Schema_Master_FSMO_Role"/>
				<updated>2021-03-05T14:32:00Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: Created page with &amp;quot;The Schema Master MMC tools is not generally visible even if ADMT is installed.  In order to make the Schema Master MMC snap-in appear in the list, you must run   regsvr32 sch...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Schema Master MMC tools is not generally visible even if ADMT is installed.  In order to make the Schema Master MMC snap-in appear in the list, you must run&lt;br /&gt;
&lt;br /&gt;
 regsvr32 schmmgmt.dll&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands</id>
		<title>Windows Server Powershell Commands</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php/Windows_Server_Powershell_Commands"/>
				<updated>2020-12-20T15:14:46Z</updated>
		
		<summary type="html">&lt;p&gt;Jhorne: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Windows]]&lt;br /&gt;
Install Domain Controller with DNS and DHCP&lt;br /&gt;
 Install-windowsfeature -name AD-Domain-Services, DNS, DHCP -IncludeManagementTools&lt;br /&gt;
Install Remote Access and Remote Desktop Gateway&lt;br /&gt;
 Install-WindowsFeature NPAS, RDS-Gateway, DirectAccess-VPN, RSAT-RemoteAccess-Mgmt, RSAT-RDS-Gateway -IncludeManagementTools&lt;br /&gt;
Install iSCSI Target and NFS Services&lt;br /&gt;
 Install-WindowsFeature FS-FileServer, FS-Resource-Manager, FS-VSS-Agent, FS-iSCSITarget-Server, FS-NFS-Service,  RSAT-File-Services, iSCSITarget-VSS-VDS -IncludeManagementTools&lt;br /&gt;
Install Windows Server Updates Service&lt;br /&gt;
 Install-WindowsFeature UpdateServices -IncludeManagementTools&lt;br /&gt;
Uninstall Windows Server Updates Service&lt;br /&gt;
 Uninstall-WindowsFeature -Name UpdateServices,Windows-Internal-Database -Restart&lt;br /&gt;
 Then remove the contents of C:\Windows\WID\&lt;br /&gt;
Check when a user was created (or check how old a domain is, by checking administrator)&lt;br /&gt;
 Get-ADUser &amp;lt;UserName&amp;gt; -Properties whenCreated | Format-List Name,whenCreated&lt;br /&gt;
Windows Storage Manager shows all mgmt options greyed out&lt;br /&gt;
 Update-StorageProviderCache&lt;br /&gt;
Query AD for a list of computers&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 7*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows 10*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,OperatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'operatingSystem -like &amp;quot;*Windows Server*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
 Get-ADComputer -Filter 'Name -like &amp;quot;*CV*&amp;quot;' -Properties * | Select -Property Name,IPv4Address,operatingSystem,OperatingSystemVersion&lt;br /&gt;
Remove a computer from the domain:&lt;br /&gt;
 Remove-Computer&lt;br /&gt;
 Remove-Computer -ComputerName&lt;br /&gt;
Set the timezone on a server:&lt;br /&gt;
 Set-TimeZone -Name &amp;quot;Central Standard Time&amp;quot;&lt;br /&gt;
Example of setting my iSCSI interface addresses via powershell&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC3 -IPAddress 172.16.32.11 -PrefixLength 24&lt;br /&gt;
 New-NetIPAddress -InterfaceAlias NIC4 -IPAddress 172.16.33.11 -PrefixLength 24&lt;br /&gt;
Setting DNS address for interface&lt;br /&gt;
 Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses &amp;quot;IPADDRESS1&amp;quot;,&amp;quot;IPADDRESS2&amp;quot;&lt;br /&gt;
Disable/Enable Windows Firewall&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False&lt;br /&gt;
 Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True&lt;br /&gt;
Create new Network Team&lt;br /&gt;
 Get-NetAdapter&lt;br /&gt;
 New-NetLBFOTeam Team0 NIC1, NIC2&lt;br /&gt;
Installing Dell Openmanage on Windows Server Core&lt;br /&gt;
 msiexec /i SysMgmt.msi&lt;br /&gt;
 netsh advfirewall firewall add rule name=&amp;quot;Dell OpenManage Server Administrator Web GUI&amp;quot; dir=in action=allow protocol=TCP localport=1311&lt;br /&gt;
  or with powershell&lt;br /&gt;
 New-NetFirewallRule -Name Dell_OMSA -DisplayName &amp;quot;Dell OMSA&amp;quot; -Description &amp;quot;Dell OMSA Web Management&amp;quot; -Protocol TCP -Enabled True -Profile Any -Action Allow -LocalPort 1311&lt;br /&gt;
Relocating Domain FSMO Roles&lt;br /&gt;
 Move-ADDirectoryServerOperationMasterRole -Identity SERVERNAME -OperationMasterRole 0,1,2,3,4&lt;br /&gt;
Verify the current WSUS Updates source for the client&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Removing a computer object from the AD&lt;br /&gt;
 Remove-ADComputer -Identity &amp;quot;ComputerName&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Deleting partitions that appear to be undeletable&lt;br /&gt;
 diskpart&lt;br /&gt;
 list disk&lt;br /&gt;
 select disk n&lt;br /&gt;
 list partition&lt;br /&gt;
 select partition n&lt;br /&gt;
 delete partition override&lt;br /&gt;
 exit&lt;br /&gt;
Find out about shutdown events:&lt;br /&gt;
 Get-EventLog System | Where-Object {$_.EventID -eq &amp;quot;1074&amp;quot; -or $_.EventID -eq &amp;quot;6008&amp;quot; -or $_.EventID -eq &amp;quot;1076&amp;quot;} | ft Machinename, TimeWritten, UserName, EventID, Message -AutoSize -Wrap&lt;br /&gt;
Clear Dirty Shutdown Event Tracker (run from admin command promt)&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdown /f&lt;br /&gt;
 reg Delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability /v DirtyShutdownTime /f&lt;br /&gt;
Running Windows Backup:&lt;br /&gt;
 wbadmin start backup -backuptarget:D: -include:C: -allcritical -quiet&lt;br /&gt;
 wbadmin get versions&lt;br /&gt;
Equivalent of 'grep'ing in Unix:&lt;br /&gt;
 netstat -p TCP | Select-String -Pattern 3389&lt;br /&gt;
Joining a domain:&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Desktops,dc=corp,dc=domain,dc=com'&lt;br /&gt;
 Add-Computer -Credential corp\administrator -DomainName corp.domain.com -OUPath 'ou=Servers,dc=corp,dc=domain,dc=com' -NewName ServerName&lt;br /&gt;
List all Possible windows features&lt;br /&gt;
 Get-WindowsFeature&lt;br /&gt;
Installing SNMP: (and it will also install SNMP-Service too)&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider&lt;br /&gt;
Installing Windows Backup Service&lt;br /&gt;
 Install-WindowsFeature Windows-Server-Backups&lt;br /&gt;
 Install-WindowsFeature SNMP-WMI-Provider,  Windows-Server-Backup&lt;br /&gt;
Installing .net 3.5 (mount the Server 2012 DVD first)&lt;br /&gt;
 Install-WindowsFeature –name NET-Framework-Core –source D:\sources\sxs&lt;br /&gt;
Windows Update Client check in to WSUS server&lt;br /&gt;
 wuauclt /detectnow&lt;br /&gt;
Windows Update Client has not checked into server in a long time but client is online&lt;br /&gt;
 wuauclt /resetauthorization /detectnow&lt;br /&gt;
Verify WSUS client Settings:&lt;br /&gt;
 REG QUERY &amp;quot;HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate&amp;quot;&lt;br /&gt;
Extending a file system, such as after you extend the disk within VMware and you want to avoid logging onto the system to finish the file system extend&lt;br /&gt;
  &amp;quot;rescan&amp;quot; | diskpart&lt;br /&gt;
  $MaxSize = (Get-PartitionSupportedSize -DriveLetter d).sizeMax&lt;br /&gt;
  Resize-Partition -DriveLetter d -Size $MaxSize&lt;br /&gt;
Shrinking a file system might give an error about not enough disk space, so defrag it first:&lt;br /&gt;
 defrag -c -w -v&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are deprecated versions of commands:&lt;br /&gt;
&lt;br /&gt;
Print out all available features:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /get-features&lt;br /&gt;
Install Windows Backup Service:&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /featurename:WindowsServerBackup&lt;br /&gt;
Install .net 3.5.  There is sometimes an error dectecting the source files, so we specify the CD sources instead.&lt;br /&gt;
 PS C:\Windows\system32&amp;gt; dism.exe /online /enable-feature /all /featurename:NetFX3 /Source:D:\sources\sxs&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>	</entry>

	</feed>