Category: PowerShell
-
Simple PowerShell Account Creation script
Recently I was inspired by the excellent Master User Creator, which we cannot use, and I had some free time, so I decided to create something simple, but still useful for my service desk guys. I ended with following script – combination of PowerShell , Mahapps and XAML. Script requires PowerShell 7, installed RSAT tools…
-
PowerShell note for myself – Hashtables, arrays and their output to .csv in the wanted way
This is a note for myself to finally remember once and for all how to export a result to .csv file properly (with column headers in this case) using GetEnumerator()
-
Get size of all items in current path
I was looking for an easy way to get the size of all user profiles folder through PowerShell and found this woshub and inspired by it ended with the following function which measures the size of everything in current path if used without parameter. Made it a function just to be able to autoload it.…
-
SCCM – Change Site Code on multiple computers
If you had to change the sccm client site code on multiple computers (after sccm migration or new/upgraded server installation) nowadays you might have discovered that it’s not as easy as it should be. You could push the new site client to all computers generating a lot of heat to the network or try deprecated…
-
PSWriteHTML is awesome
Recently I was playing with the excellent PSWriteHTML powershell module and ended up creating a dashboard from events. Since I had a hard time going through all of the dashboard option, I’ve decided to share what I did, may be it will help someone. The example script requires PSWriteHTML module installed. Event properties I got…
-
PowerShell HTML System Report
I’ve been playing with HTML in PowerShell and ended creating not so bad script including function that creates HTML report with system info for a remote computer/server. In includes Operating System, CPU, Memory and Hard Disk, CD-Rom Info which are exported to a html file. It’s not a piece of art, have some basic error…
-
Microsoft Windows Security Audit Event Accesses IDs
I’m working on a powershell script extracting the file server audit log and creating a human readable html out of it when I got stumbled by the beautiful codes below (which are really hard to find) and decided that they deserve a re-post. Thanks to this guy for translating them. The list below is from…
-
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…