Hello,
I am trying to create an template for monitoring the count of file for a share and if so, to be notified. However, I am receiving an error for access denied.I put Execution Mode to Local.
$FileCount =(dir \\mytestcomputer\test |Measure-Object).Count
if ($filecount -ge 1) {
'Message.filecount: {0} files are written on the share' -f $filecount
} else {
"Message.filecount: No files exist on the share"
}
+ CategoryInfo : PermissionDenied: (\\mytestcomputer\test:String) [Get-ChildItem], UnauthorizedAccessException
+ FullyQualifiedErrorId : ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetChildItemCommand
I am successfully access the share via PS from the Solarwinds Server and get file count but not from Solariwinds Console.
The account I am using has a full NTFS permission on the drive and folder and Full share permissions.