List Checkpoint, Configuration and Snapshot File Locations:
get-vm | select id,name,*location | ft -AutoSize
List the HardDrives attached into the Virtual Machines
get-vm | Get-VMHardDiskDrive | sort Path | select vmname,Path
List Checkpoint, Configuration and Snapshot File Locations:
get-vm | select id,name,*location | ft -AutoSize
List the HardDrives attached into the Virtual Machines
get-vm | Get-VMHardDiskDrive | sort Path | select vmname,Path
fsutil file createnew c:\filess\FILE19.xlsx 1909900
$file = "c:\filess\FILE19.xlsx"
$mn = 2
do {
$id = "$mn"+' - Test Message #'+$mn
$id
$mn--
(Get-Mailbox zez*) | % {Send-MailMessage -SmtpServer (Get-ExchangeServer).Fqdn -To $_.primarysmtpaddress -From admin@domain.com -Subject $id -Body "ATTACHMENT TO FILL UP THE MAILBOX" -attachment $file}
}while($mn -gt '0')
start-transcript
$syncstats = Get-SyncRequestStatistics user@domain.com -IncludeReport -DiagnosticInfo verbose
$syncstats.Report.Failures | group failuretype
$syncstats.Report.Failures | select -last 2
$syncstats.Report.InternalFailures
$syncstats.DiagnosticInfo
$syncstats.Report.Entries | % {[string] $_}
stop-transcript
=LEFT(B2,LEN(B2)-2)/10^((MATCH(RIGHT(B2,2),{"PB","TB","GB","MB","KB"},0)-3)*3)
to MB, handling error
=IFERROR(LEFT(D2,LEN(D2)-2)/10^((MATCH(RIGHT(D2,2),{"PB","TB","GB","MB","KB"},0)-4)*3),0)
$P = 1
$messages = $null
do
{
Write-Host “Message Trace – Page $P…”
$temp_Messages = Get-MessageTrace -startdate "09/12/2022 12:00:00 AM" -Enddate "09/12/2022 06:00:00 PM" -PageSize 1000 -Page $P
$P++
$Messages += $temp_Messages
}until ($temp_Messages -eq $null)
#display messages
$Messages.Count
$Messages
To list saved credentials:
cmdkey /list:TERMSRV/*
To delete a saved credential:
cmdkey /delete:TERMSRV/<targetNameOrIp>
To add a credential that will actually work with CG turned on:
cmdkey /generic:TERMSRV/<targetNameOrIp> /user:<username> /pass:<password>
Cmdkey