There is only one recommended way to uninstall the SCCM client and it's a pretty straight forward exercise. The only thing to watch out for is the location of the ccmsetup file varies depending on which o/s you're using....
1] From the CMD Prompt (32bit)
Open a cmd prompt as admin
Change (cd) to the directory where ccmsetup.exe can be found (chances are this'll be %windir%\system32\ccmsetup).
Then enter ccmsetup.exe /uninstall
2] From the CMD Prompt (64bit)
Open a cmd prompt as admin
Change (cd) to the directory where ccmsetup.exe can be found (chances are this'll be %windir%\Windows\ccmsetup).
Then enter ccmsetup.exe /uninstall
Thursday, 29 August 2013
Wednesday, 28 August 2013
VBS Script to Discover Last Reboot Time of Multiple Machines/Servers
On occassion you may wish to find the last reboot time of any given number of machines/servers on your network (for example if you need to check how many have rebooted following a patch update). The following script, cribbed from a technet article, works well and spits out a text file listing all the servers, their last reboot time and how many hours the system has been up for.
1]
create a text file listing all the servers/computers you want info on and name it servers.txt
2]
copy the below text into notepad and save it as ServerReboot.vbs. Be sure to save it into the same folder as the servers.txt file.
' =====================================================================
Set objTextFile = objFSO.OpenTextFile("c:\scripts\servers.txt", ForReading)
Set outfile = objFSO.CreateTextFile("Report.txt")
Do Until objTextFile.AtEndOfStream
strComputer = objTextFile.Readline
' ===============================================================================
' Code to get the Last Boot Time using LastBootupTime from Win32_Operating System
' ===============================================================================
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOS in colOperatingSystems
dtmBootup = objOS.LastBootUpTime
dtmLastBootupTime = WMIDateStringToDate(dtmBootup)
'OutFile.WriteLine "=========================================="
OutFile.WriteLine "Computer: " & strComputer
OutFile.WriteLine "Last Reboot: " & dtmLastBootupTime
dtmSystemUptime = DateDiff("h", dtmLastBootUpTime, Now)
OutFile.WriteLine "System is online since " & dtmSystemUptime & " hours"
OutFile.WriteLine "=========================================="
Next
' =====================================================================
' End
' =====================================================================
Loop
objTextFile.Close
' ===============================================================================
' Displaying to the user that the script execution is completed
' ===============================================================================
MsgBox "Script Execution Completed. The Report is saved as Report.txt in the current directory"
' ===============================================================================
' Function to convert UNC time to readable format
' ===============================================================================
Function WMIDateStringToDate(dtmBootup)
WMIDateStringToDate = CDate(Mid(dtmBootup, 5, 2) & "/" & _
Mid(dtmBootup, 7, 2) & "/" & Left(dtmBootup, 4) _
& " " & Mid (dtmBootup, 9, 2) & ":" & _
Mid(dtmBootup, 11, 2) & ":" & Mid(dtmBootup, _
13, 2))
End Function
3]
open up the cmd prompt and execute the vbs file.
4]
wait for the script to chug along and then spit out a report.txt file.
Low and behold a list of servers/computers has been generated along with their last reboot times.
For further info see the following page: http://blogs.technet.com/b/manojnair/archive/2010/03/30/vbscript-to-find-out-last-reboot-time-of-multiple-computers.aspx
1]
create a text file listing all the servers/computers you want info on and name it servers.txt
2]
copy the below text into notepad and save it as ServerReboot.vbs. Be sure to save it into the same folder as the servers.txt file.
' =====================================================================
Set objTextFile = objFSO.OpenTextFile("c:\scripts\servers.txt", ForReading)
Set outfile = objFSO.CreateTextFile("Report.txt")
Do Until objTextFile.AtEndOfStream
strComputer = objTextFile.Readline
' ===============================================================================
' Code to get the Last Boot Time using LastBootupTime from Win32_Operating System
' ===============================================================================
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOS in colOperatingSystems
dtmBootup = objOS.LastBootUpTime
dtmLastBootupTime = WMIDateStringToDate(dtmBootup)
'OutFile.WriteLine "=========================================="
OutFile.WriteLine "Computer: " & strComputer
OutFile.WriteLine "Last Reboot: " & dtmLastBootupTime
dtmSystemUptime = DateDiff("h", dtmLastBootUpTime, Now)
OutFile.WriteLine "System is online since " & dtmSystemUptime & " hours"
OutFile.WriteLine "=========================================="
Next
' =====================================================================
' End
' =====================================================================
Loop
objTextFile.Close
' ===============================================================================
' Displaying to the user that the script execution is completed
' ===============================================================================
MsgBox "Script Execution Completed. The Report is saved as Report.txt in the current directory"
' ===============================================================================
' Function to convert UNC time to readable format
' ===============================================================================
Function WMIDateStringToDate(dtmBootup)
WMIDateStringToDate = CDate(Mid(dtmBootup, 5, 2) & "/" & _
Mid(dtmBootup, 7, 2) & "/" & Left(dtmBootup, 4) _
& " " & Mid (dtmBootup, 9, 2) & ":" & _
Mid(dtmBootup, 11, 2) & ":" & Mid(dtmBootup, _
13, 2))
End Function
3]
open up the cmd prompt and execute the vbs file.
4]
wait for the script to chug along and then spit out a report.txt file.
Low and behold a list of servers/computers has been generated along with their last reboot times.
For further info see the following page: http://blogs.technet.com/b/manojnair/archive/2010/03/30/vbscript-to-find-out-last-reboot-time-of-multiple-computers.aspx
Monday, 19 August 2013
Windows 7 and 2008R2 - Webpage displaying text only, no images in Internet Explorer
In cases such as this you may find that although text is generally present, things such as backgrounds, active buttons, text-entry boxes and animations are all missing. There are a number of possible reasons that this may be happenening and, as such, a number of different troubleshooting approaches you can utilise:
Possible Cause A:
The machine has the High Contrast setting enabled which is causing the webpage(s) to be only partially rendered.
1. Click on the Start button > Control Panel > Ease of Access > Ease of Access Center > Make the computer easier to see.
2. Under High Contrast, uncheck all the options listed under “High contrast”.
Possible Cause B:
IE is set to use No Style to view webpages, this may cause the browser to display the text only format.
1. Open IE. Go to View > Style > select Default Style
Possible Cause C:
Compatability mode isn't turned on and so the site isn't being processed correctly by IE. Although this feature should be turned on automatically, it's always worth double checking that it's actually on.
Possible Cause D:
Some setting within Internet Explorer has either been changed or become corrupt. Try to restore IE to it's original state.
1. Open IE. Select Tools > Internet Options > Advanced > click on both Restore advance Settings and Reset
Possible Cause A:
The machine has the High Contrast setting enabled which is causing the webpage(s) to be only partially rendered.
1. Click on the Start button > Control Panel > Ease of Access > Ease of Access Center > Make the computer easier to see.
2. Under High Contrast, uncheck all the options listed under “High contrast”.
Possible Cause B:
IE is set to use No Style to view webpages, this may cause the browser to display the text only format.
1. Open IE. Go to View > Style > select Default Style
Possible Cause C:
Compatability mode isn't turned on and so the site isn't being processed correctly by IE. Although this feature should be turned on automatically, it's always worth double checking that it's actually on.
- See if the Compatibility View button appears in the Address bar. (If you don't see the button, there's no need to turn on Compatibility View.)
- Tap or click the Compatibility View button to display the site in Compatibility View.
Possible Cause D:
Some setting within Internet Explorer has either been changed or become corrupt. Try to restore IE to it's original state.
1. Open IE. Select Tools > Internet Options > Advanced > click on both Restore advance Settings and Reset
Thursday, 8 August 2013
Block Size on Disk
After a disk has been formatted with NTFS it can be slightly tricky to figure out what block size it has been formatted with. Although there are several ways to find this info, the most straightforward way is to use cmd line.
Enter the following command:
fsutil fsinfo ntfsinfo c:
Enter the following command:
fsutil fsinfo ntfsinfo c:
This illustrates that the block size on the c: drive is currently set to 4K.
If you ever need to change the block size, the best way to do this is to open up Computer Management > Storage > Disk Management
Right click on the volume and choose Format
From the drop down list choose the block size you need
Tick the box for Quick Format and click OK
The disk should now be formatted with the block size that you require
Monday, 5 August 2013
Handy LDAP Queries - Active Directory and Quest Active Roles
Every now and again, you may need to use LDAP to query Active Directory or Quest in order to pull out some information. Below i've listed a couple of simple LDAP queries which can be used to source out various things:
all user accounts which currently have an Expired Password:
(&(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=65536)(|(userAccountControl:1.2.840.113556.1.4.803:=8388608)(pwdLastSet<=130123548000000000))(!pwdLastSet=0))
all user accounts which have a password set to Never Expire:
(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=65536))
all user accounts which have not logged on for 60 days:
(&(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2)(|(lastLogonTimestamp<=130149468000000000)(!lastLogonTimestamp=*)))
all user accounts which are enabled but locked out:
(&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(lockoutTime>=1))
all user accounts which are disabled:
(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2))
all user accounts which have a city set as London:
(l=London*)
all user accounts in which the last name starts with 'robot':
(sn=robot*)
If you ever find yourself trying to convert an Active Directory Query into a LDAP Query, it's well worth opening the Active Directory Administrative Center. Here you can do a Global Search and choose all the categories/filters you're interested in and then, when you've got it working as you want it to, simply click on the 'Convert to LDAP' button and ADAC will convert your query into LDAP.
Subscribe to:
Posts (Atom)