On my workstation i am running Microsoft Windows Vista 64bit.
Today i got a small scripting task, which required me to view the Microsoft System Center Configuration Manager Agent Log files.
On most Operating Systems (aka. 32bit) the log files are placed in “C:\Windows\CCM\Logs\”.
But on mine it was not. I had no luck search the internet, so i tried a files search for one of the logfiles.
I discovered that on my system they are located in “C:\Windows\sysWOW64\CCM\Logs”.
The reason for this, must be because the agent is 32bit and my system i 64bit.
I hope someone else will find my blog post, if they are facing the same problem as me.
– Jakob
This might be useful for some people:
Function Get-SCCMLogLocation {
Param (
$ComputerName,
$OpenLogLocation=$true
)
$SCCMLogs = Get-WMIObject -Namespace rootccmpolicymachine CCM_Logging_GlobalConfiguration -ComputerName $ComputerName | Select -ExpandProperty LogDirectory
$SCCMLogs = $SCCMLogs -replace “:”, “$”
If ($OpenLogLocation)
{Invoke-Item “\$ComputerName$SCCMlogs”}
Else
{return $SCCMLogs}
}
Jello Luke.
Thnx alot for this Powershell function! 🙂