Windows Server

Windows Servers Tips

Query Workstations SCCM

Fox x64 bit workstations: Or use the one from this Technet post select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Caption like “%7%” and SMS_R_System.Client = 1 and SMS_R_System.Obsolete = 0 and SMS_G_System_COMPUTER_SYSTEM.SystemType = “x64-based PC” If you dont want to filter obsolete and client installed machines remove ” SMS_R_System.Client = 1 and SMS_R_System.Obsolete = 0 and” For x86 workstations:   select *  from  SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.SystemType = “X86-based PC”

SharePoint 2013 Instalation Tips

Studying for SharePoint 2013 exam, I’ve decided to install it in my lab and as usual I had some issues. I was thinking to use SQL server on premises used for SCCM 2012 R2 test lab, but it is 32-bit, therefore, unusable. Due to the limited resources (You know, RAM goes first) I ended installing 64-bit SQL Server 2012 SP1 on the same server (standard 2012 R2) side-by-side with 32-bit SQL. It’s not the best practice, but it is OK for a constantly changing test lab. Installation was pretty straight forward, all prerequisites were already installed and in minutes 64-bit SQL server was in place. I have two pre-created domain accounts sqladmin and spsservice used… Read More »SharePoint 2013 Instalation Tips

Create an SCCM collection containing inactive clients excluding certain computers

Create a new collection and use the following query to select inactive agents, the part in bold is to exclude all computers with name stating with PCNAME% from it if needed, % is equal to * in sql so if your naming convention is pcname01, pcname02  and so on pcname06% will exclude pcname060, pcname061, pcname0600 and so on. If you want to remove one or two names only you can use (“pcname01″,”pcname02”) instead of pcname% select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System inner join SMS_G_System_CH_ClientSummary on SMS_G_System_CH_ClientSummary.ResourceID = SMS_R_System.ResourceId inner join SMS_G_System_SYSTEM on SMS_G_System_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_CH_ClientSummary.ClientActiveStatus = 0 and SMS_G_System_SYSTEM.Name not like “PCNAME%” One of the fixes for inactive clients could be found here First part… Read More »Create an SCCM collection containing inactive clients excluding certain computers

Tested guide for upgrade 2003 domain to 2012

Raise domain/forest functional level to 2003 Domain is raised from AD users and computers Forest is raised from AD Domains and Trusts Prepare AD for 2012 The command adprep is located on your Server 2012 disk under the \support\adprep Run in cmd adprep /forestprep If KB919151 is not installed adprep /forestprep will fail with “ADPREP.EXE is valid, but is for a machine type other than the current machine” – REMARK addprep.exe must be copied from x86(or x64) folder to the folder where all other files (sch1, sch2, and so on, schema.ini is also inside), then run it from there. Install 2012R2 server, join it to the domain and promote it as DC First add active… Read More »Tested guide for upgrade 2003 domain to 2012

Install/Uninstall Feature PowerShell Server 2012 Quick Notes

To get the list of all features(feature names are in the second column, Windows PowerShell cmdlets are not case-sensitive): get-WindowsFeature To uninstall completely a feature: Uninstall-WindowsFeature featurename -remove If -remove is not used the feature will be listed as available, however, it won’t be removed from the harddrive. To install a feature after it’s removed we need an installation wim file as a source. To Mount a Windows WIM to the file system: Get Info what’s in the wim file, features cannot be mixed, that’s why indexes are important – if core is installed  then find which index belongs to core, because wim file contains more than one windows editions dism /get-wiminfo /wimfile:wimfilepath (Example if installation… Read More »Install/Uninstall Feature PowerShell Server 2012 Quick Notes

Log Off User remotely – cmd

If you ever wondered how to log off user remotely (or locally) via command line try this. As usual membership of the local admins group is needed. Start cmd with elevated privileges. check logged user and their session number with qwinsta: QWINSTA /server:computername Memorize the session ID and use the logoff command: LOGOFF sessionID /server:computername.    

Proxmox Post Install +

My ProxMox Adventure – what I did so far Installed from CD (described in the previous post) Added additional 7200rpm, 2tb hard drive for storage purposes Created Several VM’s server core 2012 as s DC, DNS, GC – HDD shrink to 20gb One win7x64 as a domain workstation One win7x64 with 1tb hdd as a plex server – installed on 7200rpm drive, don’t like the performance of the hdd at all SCCM 2012 R2 on top of Server 2012 Exchange 2013 on top of Server 2012 To Do List Set Up And Test ProxMox Firewall – Not Started Yet Set Up A Backup – In Progress, Done to NFS, will try it to external hdd as well… Read More »Proxmox Post Install +