Check the hard drive integrity - firewall checkpoint 5800

 To check the integrity of a hard drive in the Gaia/SecurePlatform OS:

    Connect to the machine over console (serial).

    Reboot the machine.

    Press a key on the "Press any key to see the boot menu" screen. The Check Point Boot Menu now opens.

    Select the "Start in maintenance mode".

    Enter the Expert mode credentials.

    Unmount the file system:

    # umount -a

    For the EXT3 file system, run the applicable 'fsck' commands (skip this step if you have a XFS file system):

        Check and update the bad block list, but do NOT repair:

        # fsck -f -n -c -v

        Repair automatically:

        # fsck -f -p -c -v

        Note: If you detect inconsistencies, 'fsck' may require the user to remove the '-p' flag from the syntax. In such a case, use the 'fsck -f -y' command instead to assume 'yes' to all questions.

        # fsck -f -c -v -y
        # sync
       # reboot

Get the modified date with powershell

 

To get the modified date on a single file try:

$lastModifiedDate = (Get-Item "C:\foo.tmp").LastWriteTime

To compare with another:

$dateA= $lastModifiedDate 
$dateB= (Get-Item "C:\other.tmp").LastWriteTime

if ($dateA -ge $dateB) {
  Write-Host("C:\foo.tmp was modified at the same time or after C:\other.tmp")
} else {
  Write-Host("C:\foo.tmp was modified before C:\other.tmp")
} 
 
Get-ChildItem -Path D:\PowerShell\ActiveDirectoryGroupList.csv | select Name,CreationTime
 

Get file version information from the command line

 

PS> (Get-Command C:\Path\To\Thing.dll).FileVersionInfo.FileVersion
3.1.0.2

The version number parts of the File­Version­Info are

Product Field File Field Meaning Example
ProductVersion FileVersion String version 3.1.0.2 (alpha)
ProductMajorPart FileMajorPart First number 3
ProductMinorPart FileMinorPart Second number 1
ProductBuildPart FileBuildPart Third number 0
ProductPrivatePartFilePrivatePartFourth number2

Install MSIX with powershell

 Add-AppxPackage -Path "C:\Users\MyUserName\Downloads\affinity-designer-2.0.0.msix" -DependencyPath " https://aka.ms/Microsof...

Mais vistos