To extend a dynamic spanned volume using diskpart, first you need to add the new disk to the system, then run the following:
windows
I just found the following utility that could be used to remove roaming profiles that have not been used in more than X days:
https://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool/
The only options I could find in GPO/Registry are delete profile immediately on log-off, or delete ALL profiles (including local) after X days of inactivity on machine reboot. Neither of these options are ideal for managing roaming profiles.
I was recently involved in troubleshooting an issue where an on-premis exchange deployment was bouncing e-mails with an error that the user did not have an MDB assigned. This was a multi-tenant exchange deployment, so we could not use the official hybrid mode, but we were using one of the sync tools to keep usernames and passwords for the local users in sync with the office 365 users.
Use the quser command to find the session ID, then logoff to log the user off as follows:
To list all WMI performance counter sources, the following powershell command can be used:
Get-WmiObject -List
You can also have a look at the counters available using
Get-WmiObject -Class _ClassName_
To view all host file entries for all machines (assuming the machine you are on has the AD powershell modules, and can reach all machines):
foreach ($comp in Get-ADComputer -Filter * -Properties Description | Where-Object { $_.Description.Length -eq 0 -or $_.Description -ne "Failover cluster virtual network name account" }) { $hostfile= "\\"+ $comp.name +"\c$\windows\system32\drivers\etc\hosts"; $comp.name; $data=Get-Content $hostfile; foreach($line in $data) { if($line.Length -eq 0 -or $line.StartsWith("#")) { continue; } $line } }
Windows password policies through GPO are applied at the computer level. If a GPO is with a computer password policy is applied at the top “domain” level, it affects all users in AD. If a GPO with a computer password policy is applied at an OU level, it affects all local accounts on any computer that is in the affected OU tree.
I needed to change the firewall profile for a network adapter from public to private in windows server 2012. The only way I could work out to do it was using the following registry edit:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\{}
The value of Category is set as follows for the firewall profile:
Public = 0
Private = 1
Domain = 2
You need to match the detected network setting with the ProfileName key under the GUID, and modify the Category value as required.
the following powershell can be used to find all VSS scheduled tasks and alter the minutes to a random value.
$TaskService = new-object -comobject "Schedule.Service"
$TaskService.Connect()
$Folder = $TaskService.GetFolder("\")
$Task = $folder.GetTasks(0) | where {$_.Name.StartsWith("ShadowCopyVolume")}
if($Task.GetType().BaseType.Name -eq "Array") {
exit 1
}
$SetMinute=Get-Random -Minimum 1 -Maximum 59
$TaskDef=$Task.Definition
To add a domain to an IE zone using GPO for all users on a computer without locking the settings, you can do the following:
Open the GPO that you are adding the setting to. The GPO needs to apply Machine Settings to the machines in question