
Explanation

Box 1: $using:AdminCredentials
Box 2: Storage
Send Azure Stack Hub diagnostic logs by using the privileged endpoint (PEP) To run Get-AzureStackLog on an integrated system, you need to have access to the privileged endpoint (PEP).
Here's an example script you can run using the PEP to collect logs.
$ipAddress = "<IP ADDRESS OF THE PEP VM>" # You can also use the machine name instead of IP here.
$password = ConvertTo-SecureString "<CLOUD ADMIN PASSWORD>" -AsPlainText -Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential ("<DOMAIN NAME>\CloudAdmin", $password)
$shareCred = Get-Credential
$session = New-PSSession -ComputerName $ipAddress -ConfigurationName PrivilegedEndpoint -Credential
$cred -SessionOption (New-PSSessionOption -Culture en-US -UICulture en-US)
$fromDate = (Get-Date).AddHours(-8)
$toDate = (Get-Date).AddHours(-2) # Provide the time that includes the period for your issue Invoke-Command -Session $session { Get-AzureStackLog -OutputSharePath "<EXTERNAL SHARE ADDRESS>" -OutputShareCredential $using:shareCred -FilterByRole Storage -FromDate $using:fromDate
-ToDate $using:toDate}
if ($session) {
Remove-PSSession -Session $session
}
Reference:
https://learn.microsoft.com/en-us/azure-stack/operator/azure-stack-get-azurestacklog