Monday, 21 November 2016

SCCM 2012 Maintenance Tasks

Daily:

·    Monitoring Alerts on SCOM web console or SCCM status messages

·    Ensuring availability of SCCM site servers

·    Monitoring & Controlling SCCM site health status

·    Monitoring & Controlling client health status

·    Ensuring successful backup on all primary servers

·    Monitoring site system's inbox folder(s)

·    Ensuring ongoing production packages are copied to DPs

·    Monitoring long running queries

·    Monitoring Audit messages

Weekly:

·    Delete unnecessary objects

·    Delete unnecessary files from site systems

·    Check disk space on all site systems

·    Check advertisement status

·    Review Package status

·    Review sync between SCCM (Parent-Child) sites

·    Clean out old machines and user accounts


 

 

Monthly:

·    Defragment all sccm site systems

·    Perform Database Maintenance

·    Review advertisement success/failure rate

·    Review SCCM updates & SQL updates on all SCCM servers

·    Reviewing AD & SMS objects

·    Review SCCM site settings on all SCCM servers

·    Performance review & tuning

·    Stale object deletion from SCCM database

 

Quarterly:

·    Review SCCM Site boundaries

·    Review SCCM-OU Mapping

·    Capacity planning

Half Yearly / Bi-Annually:

·    Package Archival

·    SCCM hierarchy review

·    Review SCCM security

·    Review SCCM reports

·    Review security updates on SCCM servers

Yearly / Annually:

·    Perform DR test

·    Review SCCM Design

·    Review Documentation

·    Review Maintenance plan

Tuesday, 20 September 2016

Listing Task Sequence Variables:

Listing Task Sequence Variables:

With Powershell script

$tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment
$tsenv.GetVariables() | % { Write-Host "$_ = $($tsenv.Value($_))" }



IE Free Tool to List Task Sequence Variables:

TSEnv2.exe list
TSEnv2.exe list > osdvarables.txt
TSEnv2.exe get _SMSTSMDataPath

How can I open an intractive command window with task sequence



Interactive cmd prompt with command prompt

cmd.exe /c "start /wait cmd.exe"

"%toolroot%\ServiceUI.exe" -process:tsprogressui.exe "%WINDIR%\System32\cmd.exe"

AD Security Group Discription update Vbscript


Const ForReading = 1
'On Error Resume Next
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\scripts\LDConnect.txt", ForReading)
Set objFile2 = objFSO.OpenTextFile("C:\scripts\Update.txt", ForReading)

While not objFile.AtEndOfStream 
While not objFile2.AtEndOfStream 
    
    'WScript.Echo vbCrLf
'WScript.Echo vbCrLf
    
    strGroupDN = objFile.ReadLine
UPDateAdminDesc = objFile2.Readline
    'WScript.Echo strGroupDN '& vbCrLf
    'WScript.Echo UPDateAdminDesc '& vbCrLf

set objUser = GetObject("LDAP://" & strGroupDN)
objUser.Put "adminDescription", UPDateAdminDesc

objUser.SetInfo

Wend
Wend
objFile.Close
objFile2.Close

For VNC creating VNC Shortcut

Powershell script For VNC creating VNC Shortcut



$a = Get-WmiObject -query "select * from Win32_NetworkAdapterConfiguration where IPEnabled = $true" |
  Select-Object -Expand IPAddress | 
  Where-Object { ([Net.IPAddress]$_).AddressFamily -eq "InterNetwork" }


# Create a Shortcut with Windows PowerShell
$TargetFile = "c:\support\vncviewer.exe"
$ShortcutFile = "x:\windows\temp\VNC.lnk"
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)
#$c = $targetfile + $a
$shortcut.TargetPath = $TargetFile
$Shortcut.Arguments = "$a /password 1234"
$Shortcut.Save()

Windows Update for Business not WSUS

WufB:  Windows Update for Business:

Windows Update for Business enables information technology administrators to keep the Windows 10-based devices in their organization always up to date with the latest security defenses and Windows features by directly connecting these systems to Microsoft's Windows Update service. By using Group Policy Objects, Windows Update for Business is an easily established and implemented system which enables organizations and administrators to exercise control on how their Windows 10-based devices are updated, by allowing:

  • Deployment and validation groups; where administrators can specify which devices go first in an update wave, and which devices will come later (to ensure any quality bars are met).
  • Peer-to-peer delivery, which administrators can enable to make delivery of updates to branch offices and remote sites with limited bandwidth very efficient.
  • Use with existing tools such as System Center Configuration Manager and theEnterprise Mobility Suite.

Supported Devices:

All devices running Windows 10 Pro, Enterprise, and Education on the Current Branch for Business (CBB) are Windows Update for Business eligible.

 

For Windows 10 updates has been recently released on November 12 and with that recent update, have introduced a new GPO settings call "Defer Upgrades and Updates".

To see what that setting looks like, open "Local Group Policy Editor" (Run –>gpedit.msc) and browse to "Computer Configuration" –> "Administrative Templates" –> "Windows Components" –> "Windows Update" and you will find the below screen.





The new "Defer Upgrades and Updates" introduces 3 new options:

  1. Defer upgrades up to 8 months (1 month increment)
  2. Defer updates up to 4 weeks (1 week increment)
  3. Pause Upgrades and Updates until the next update/upgrade release (around 30 days)

Note 1: You can't use those settings in conjunction with WSUS. if you specify an internal update service location, above settings will be ignored.

Note 2: By just enabling this GPO setting and not delaying anything (leaving both durations to 0), it will turn the target computers to CBB (Like the old GPO setting "Defer Upgrade" was doing in the Windows 10 RTM build).

 

Monday, 19 September 2016

Get IP address Powershell Script


Below are the script for getting Ipaddress with Powershell

Method 1:

Get-WmiObject -query "select * from Win32_NetworkAdapterConfiguration where IPEnabled = $true" | %{$_.IPaddress -notmatch 'fe80'}


Method 2:

$a = Get-WmiObject -query "select * from Win32_NetworkAdapterConfiguration where IPEnabled = $true" |
  Select-Object -Expand IPAddress |
  Where-Object { ([Net.IPAddress]$_).AddressFamily -eq "InterNetwork" }


When i Call $a I get Ipaddress results...