Friday, March 27, 2015

Microsoft's SCCM 2012 Troubleshooting - Log Files

In my time dealing with SCCM or as it is also known as ConfigMgr, it is a very good tools to maintain, update and monitor an environment. Features that is comes with are Software Updates, Application management, Operating System (OS) deployments and a whole host of other features.


The point of this blog is to help troubleshoot issues, this is an open blog so feel free to point out other options or mistakes from myself.  I am not saying I am master of SCCM in any way shape or form. SCCM is a beast of a system, and as always there are many ways to troubleshoots and fix issues. If there is a better way to troubleshoot an issue let us know.

Let's start with log files.

Log Files 


Log files in ConfigMgr 2012 is a mine field. From Site System Server to  Site Server to Client side log files are everywhere. Hope the following information will help out in what direction to start troubleshooting.
Of course you will need to know how to read the log files. Notepad is most people's default, but the issue with Notepad is the log files are not well formatted in it. Plus that when you want to read the log file when it is being generated and try and find an issue. Notepad does not auto update, so when you load a log file that is being generated any new event(s) that get added to the log file will not show up. 
So I use CMTrace, this can be found from here

The link takes you to Microsoft's download center for System Center 2012 R2 Configuration Manager Toolkit. This  Toolkit, has 15 very useful tools to help you manage and troubleshoot SCCM 2012.
 
As always Microsoft's TechNet website is a good place to start.

Technical Reference Article - https://technet.microsoft.com/en-us/library/hh427342.aspx

Client Logs - https://technet.microsoft.com/en-us/library/hh427342.aspx#BKMK_ClientLogs

Site Server Logs - https://technet.microsoft.com/en-us/library/hh427342.aspx#BKMK_ServerLogs

ConfigMgr Functionality Logs - https://technet.microsoft.com/en-us/library/hh427342.aspx#BKMK_FunctionLogs

For clients log files are located at '%SystemRoot%\CCM\Logs'. %SystemRoot% is a variable that will point to the location where your Windows OS is installed. In most cases it will be 'C:\Windows'.

When installing the SCCM Client the log files are location at 'C:\Windows\CCMSetup'.

For Servers the log files will be located in the installation directory of SCCM. So we will be looking in 'C:\Program Files\Microsoft Configuration Manager\Logs'

Client Logs on a Site System are located at 'C:\Program Files\SMS_CCM\Logs' Setup logs are in 'C:\Windows\CCMSetup'

Here is a spreadsheet with the paths, information is taken from Microsoft's website. Link


Wednesday, March 25, 2015

Guide to Powershell for dummies

Quick PowerShell Remoting Guide

This is small guide which allows you to create Remote Powershell Sessions (like SSH). It allows you to create connection to Host which have Powershell.
•Allow Powershell Remoting on the Remote Host
•Add Trusted Hosts on the Local Computer
•Create a new Remote Session
•Leave a Powershell Remote Session
•Close a Powershell Remote Session
•Send a command to a Remote Host

Allow Powershell Remoting on the Remote Host

Run Powershell on the Remote Host and run the following Cmdlet.

Enable-PSRemoting

This command starts the WinRM service if it’s not allready started and sets the startup type to automatic. Adds firewall exceptions for WS-Management communications and creates a listener to accept requests.

Add Trusted Hosts on the Local Computer

On the Local Computer run Powershell and run the following Cmdlet. This allows you to connect to any host. It also starts WinRM if its not already started.

Set-Item WSMan:\localhost\Client\TrustedHosts *

After that you may have to restart the WinRM service

Restart-Service winrm -Force

Create a new Powershell Remote Session
There are two ways to create a new PS Remote Session.

New-PSSession -ComputerName Computer01

With Get-PSSession you can list all active sessions. Now you can enter a active Session with Enter-PSSession and the ID

Enter-PSSession 2

A quicker way to do that, you can simply use Enter-PSSession to create a new Session and directly connect to this Session.

Enter-PSSession -ComputerName Computer01

Leave a Powershell Remote Session

To leave a Powershell Remote Session you can simply use the Exit-PSSession

Exit-PSSession

Close a Powershell Remote Session

To close a Powershell Remote Session you can list all active Sessions with Get-PSSessions command and close them with Remove-PSSession command.

Get-PSSession | Remove-PSSession

'|' is a pipe command which lets you continue your command with another command to run afterwards.
A bit like,  run this code first then once done, run this next bit of code.

Send a command to a Remote Host

To run a command on a Remote Host you can use the '-ComputerName' parameter.

Get-Service -ComputerName Server01

Get-Service -ComputerName Server01 | Where-Object {$_.Name -eq "BITS"}

With this little snippet you can run commands on multiple Hosts

Tuesday, September 27, 2011

Protecting your tweets

Twitter - Protecting your tweets

To protect your tweets so you only allow people you want to follow you, follow the below.


  • 1. Go to Twitter.com
  • 2. Log-in to your account
  • 3. Go to "Settings" in the above panel
  • 4. Scroll down in the section labeled "Account" in "Settings" and you'll find "Protect my tweets". it has more info in the description
  • 5. Check the box next to "Protect my tweets" so it can be private
  • 6. Click "Save"
  • 7. Your password will be needed to confirm that you want to protect them
  • 8. Your done, from here on in all your tweets will be protected