header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
SCCM R2
Last Post 22 Jan 2010 05:24 AM by Shay Levy. 4 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
kixzUser is Offline
New Member
New Member
Posts:2
Avatar

--
17 Jan 2010 03:07 PM

    Hi All

    How do i configure SCCM to detect a if a file "version" has been changed/updated using powershell?
    I am using the pscx get-fileversioninfo but it does not seem to work? Thanks

    as an example

    get-fileversionifo c:\inetpub\file.dll (when this command is run locally on the server, not the sccm box, it works)

    but when i configure sccm to detect the file version using the command above, it does not seem to work.

    hope it makes sense.

    thanks

    Marco Shaw (MVP)User is Offline
    Veteran Member
    Veteran Member
    Posts:1641
    Avatar

    --
    17 Jan 2010 04:35 PM
    I don't know SCCM...

    You're using it to run a command on a remote machine then using the output from the command to use that to measure for changes?

    Have you tested running PowerShell commands like this? One thing to possibly consider that if you're using SCCM to call powershell.exe on a remote machine (or even locally), you will have to manually load PSCX before you can use any commands from the snapin/module.

    I'd suggest just trying something simple like "get-process powershell", and capturing that output, then using SCCM to see if it flags any changes in the output. You'd just need to open up a PowerShell instance on the remote machine to run the test.
    Marco

    *Microsoft MVP - Windows PowerShell
    https://mvp.support.microsoft.com/profile/Marco.Shaw
    *Co-Author - Sams Windows PowerShell Unleashed 2nd Edition
    *Blog - http://marcoshaw.blogspot.com
    Shay LevyUser is Offline
    PowerShell MVP, Admin
    Veteran Member
    Veteran Member
    Posts:1362
    Avatar

    --
    18 Jan 2010 12:21 AM
    Try with this:

    [System.Diagnostics.FileVersionInfo]::GetVersionInfo("\\server\share\filename.dll")

    Shay Levy
    Windows PowerShell MVP
    http://PowerShay.com
    PowerShell Community Toolbar
    Twitter: @ShayLevy
    kixzUser is Offline
    New Member
    New Member
    Posts:2
    Avatar

    --
    21 Jan 2010 05:10 PM
    Thanks Shay. That is working.

    Will command above works with SCCM validation? any idea?

    The return of this command outputs the "Product Version and the FileVersion"

    Shay LevyUser is Offline
    PowerShell MVP, Admin
    Veteran Member
    Veteran Member
    Posts:1362
    Avatar

    --
    22 Jan 2010 05:24 AM
    I can't tell for sure.

    Shay Levy
    Windows PowerShell MVP
    http://PowerShay.com
    PowerShell Community Toolbar
    Twitter: @ShayLevy
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer