Files
claudetools/temp-get-log.ps1

7 lines
324 B
PowerShell

$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password)
Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock {
Get-Content 'C:\Shares\test\scripts\sync-from-nas.log' | Select-Object -Last 100
}