header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

We have a new sponsor!  Introducting Pragma Systems.  See the home page for details.

SCCM R2
Last Post 22 Jan 2010 01:24 PM by Shay. 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 11: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.shawUser is Offline
Site Moderator
Advanced Member
Advanced Member
Posts:593
Avatar

--
18 Jan 2010 12:35 AM  
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
ShayUser is Offline
Veteran Member
Veteran Member
Posts:1091
Avatar

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

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

Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar:
kixzUser is Offline
New Member
New Member
Posts:2
Avatar

--
22 Jan 2010 01:10 AM  
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"

ShayUser is Offline
Veteran Member
Veteran Member
Posts:1091
Avatar

--
22 Jan 2010 01:24 PM  
I can't tell for sure.

Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar:
You are not authorized to post a reply.

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