https://blogs.technet.microsoft.com/filecab/2013/08/20/dfs-replication-in-windows-server-2012-r2-if-you-only-knew-the-power-of-the-dark-shell/
(Get-DfsrBacklog -GroupName "RG01" -FolderName "RF01" -SourceComputerName SRV02 -DestinationComputerName SRV01 -Verbose 4>&1).Message.Split(':')[2]
Shadow Copy (Previous Versions) & Robocopy
A nice description for recovering files from Shadow Copy using Robocopy.
https://chaoliu12.wordpress.com/2013/02/11/restore-files-from-shadow-copy/
Windows 10 Free Upgrade
For people who use the accessibility features, you can still get a free Windows 10 update.
Distribution Group Memberships for Office 365 in PowerShell
Office 365 Mailbox Folder Permissions in PowerShell
Set-executionpolicy unrestricted
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session -allowclobber
Connect-MsolService -Credential $LiveCred
$Identity = "joe.bloggs@demo.org.uk:\Calendar"
#Remove-MailboxFolderPermission -Identity $Identity -User "A Bloke"
#Add-MailboxFolderPermission -Identity $Identity -User steve.bloggs@demo.org.uk -AccessRights Editor
Set-MailboxFolderPermission -Identity $Identity -User "Andrew Bloggs" -AccessRights Reviewer
Get-MailboxFolderPermission -Identity $Identity
Server 2008 Reboot Events
1074 is the important one, but try these as well.
6005,6006,6008,6009,6013,1074,1076
http://serverfault.com/questions/702828/windows-server-restart-shutdown-history
Remote Disk Management
On the computer which you use to connect to the server core, run this command:
netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes
Or this powershell:
Enable-NetFirewallRule -name RVM-RPCSS-In-TCP,RVM-VDSLDR-In-TCP,RVM-VDS-In-TCP
….ON BOTH THE SOURCE AND TARGET MACHINES!!!
Powershell Input Validation
https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Input-Validation-30ebaa51
Function Validate-PostalCode
{
Param([Parameter(Mandatory=$true,HelpMessage="Enter a valid Postal Code xxx-xxx-xxxx")][ValidatePattern("[0-9][0-9][0-9][0-9]")]$PostalCode)
Write-host "The Pin Code $PostalCode is valid"
}
Function validate-PhoneNumber
{
Param([ValidatePattern("\d{3}-\d{3}-\d{4}")]$phoneNumber)
Write-host "The phone number $phoneNumber is valid"
}
validate-PhoneNumber -Phonenumber 999-999-9999
function Validate-Email ([string]$Email)
{
return $Email -match "^(?("")("".+?""@)|(([0-9a-zA-Z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-zA-Z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,6}))$"
}
function Validate-IPAddress ([string]$IP)
{
if($IP -match "(\d{1,3}).(\d{1,3}).(\d{1,3}).(\d{1,3})" -and -not ([int[]]$matches[1..4] -gt 255))
{
Write-host "The $IP IP is valid"
}
}
function Validate-Filename
{
Param([ValidatePattern("^\d{8}_[a-zA-Z]{3,4}_[a-zA-Z]{1}\.jpg"]$filename)
Write-host "The filename $filename is valid"
}
Password Strengths…. NIST
https://nakedsecurity.sophos.com/2016/08/18/nists-new-password-rules-what-you-need-to-know/
Reset Windows Update
Here’s a link on instructions to reset Windows Updates: