Category: Windows Server
-
Install Primary and Additional Domain Controller With PowerShell Cheat Sheet
# # Windows PowerShell script for AD DS Deployment #Do no forget to rename the computer, set static IP, enable remote desktop if needed and so on # Install-WindowsFeature AD-Domain-Services Install-ADDSForest ` -CreateDnsDelegation:$false ` -DatabasePath “C:\Windows\NTDS” ` -DomainMode “Win2012” ` -DomainName “domain.name.com” ` -DomainNetbiosName “DOMAIN” ` -ForestMode “Win2012” ` -InstallDns:$true ` -LogPath “C:\Windows\NTDS” ` -NoRebootOnCompletion:$false…
-
Reopen Closed PowerShell Window – Server Core
Few days ago I managed to close my powershell window during an remote desktop session to a core server and I stumbled silly into the empty screen 🙂 After googling for a while I learned that your savior in this situation is: CTRL + ALT + END Give it a try, it is really worthy!
-
PowerShell TimeZone, Date and So On
If someone ever wondered how to change time, timezone or date in a powershell session or in a core server here is how. If today is 27 May 2017 and we want to set the clock to 16:12: Set-Date -Date “5/27/2017 16:12” More on this here. If only the timezone needs to be changed lets…
-
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…
-
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…
-
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…
-
Redirect New Workstations to a certain OU
Find the Distinguished Name of the OU to which you want to redirect all new computers dsquery ou -name <OU-Name> EXAMPLE – dsquery ou –name “DOMAIN WORKSTATIONS” Use redircmp Distinguished Name found with dsquery Run powershell/cmd as an administrator
-
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…
-
Delete Profiles Windows 7
Yesterday I found and tested delprof2 – it works and it’s cool timesaving tool.