This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #requires -Modules MilestonePSTools | |
| <# | |
| .SYNOPSIS | |
| Exports raw video data from a camera on a Milestone XProtect VMS to a file. | |
| .DESCRIPTION | |
| Retrieves recorded video frames from a Milestone XProtect recording server | |
| using the RawVideoSource API and writes the raw compressed frame data to a | |
| file. By default, the 32-byte VMS GenericByteData headers are stripped, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This just writes text to the terminal with Write-Host and isn't useful for long-term monitoring or logging or automation | |
| $job = Register-CimIndicationEvent -Query "SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_Process'" -SourceIdentifier ProcessWatcher -Action { | |
| param($sender, $e) | |
| $p = $e.NewEvent.TargetInstance | |
| Write-Host "`n---------`n" | |
| Write-Host "Process: $($p.Name)" | |
| Write-Host "ProcessId: $($p.ProcessId)" | |
| Write-Host "Path: $($p.Path)" | |
| Write-Host "CommandLine:" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| .SYNOPSIS | |
| Replace an old device ID with a new ID in a media database folder | |
| .DESCRIPTION | |
| If you have old XProtect recordings that you want to be able to playback in | |
| XProtect, but the old recordings were made under a different device ID than | |
| your cameras have now, you MIGHT be able to use this script to replace the | |
| old device ID with the new device ID. | |
| Before using this, you should have a secure backup of the recordings you want |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function addDllDirectoryManager { | |
| $csharp = @' | |
| using System; | |
| using System.Text; | |
| using System.Runtime.InteropServices; | |
| public static class DllDirectoryManager | |
| { | |
| [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] | |
| [return: MarshalAs(UnmanagedType.Bool)] | |
| private static extern bool SetDllDirectory(string lpPathName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $typeDef = @' | |
| using System; | |
| using System.Runtime.InteropServices; | |
| using System.Threading; | |
| namespace PSMouseControl | |
| { | |
| struct FIXED | |
| { | |
| public short fract; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-VmsCameraReport | ForEach-Object { | |
| $row = $_ | |
| $camera = Get-VmsCamera -Id $row.Id | |
| $stream = $camera | Get-VmsCameraStream -RecordingTrack Primary | |
| $settings = 'ZFpsMode', 'ZGopLength', 'ZGopMode', 'ZStrength' | |
| foreach ($setting in $settings) { | |
| $splat = @{ | |
| MemberType = 'NoteProperty' | |
| Name = $setting | |
| Value = $stream.Settings.$setting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires -Modules MilestonePSTools | |
| <# | |
| .SYNOPSIS | |
| Creates a Smart Client view containing one or more camera carousel view items. | |
| .DESCRIPTION | |
| The New-VmsCarouselView script automates the creation of Milestone XProtect Smart | |
| Client views containing carousel view items. A carousel view item automatically | |
| rotates through a list of cameras at a specified interval, displaying each camera | |
| for a set duration before moving to the next. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires -RunAsAdministrator | |
| <# | |
| .SYNOPSIS | |
| Creates memory dumps using procdump.exe with automatic compression and retention management. | |
| .DESCRIPTION | |
| This script captures memory dumps of a specified process using Sysinternals procdump.exe, | |
| compresses them into ZIP archives, and manages retention by keeping only the most recent dumps. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $script:itemFields = @' | |
| acoustid_fingerprint | |
| acoustid_id | |
| added | |
| album | |
| album_id | |
| albumartist | |
| albumartist_credit | |
| albumartist_sort | |
| albumdisambig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| [Parameter()] | |
| [int] | |
| $MinYear = 1960, | |
| [Parameter()] | |
| [int] | |
| $MaxYear = 2020, | |
| [Parameter()] |
NewerOlder