Sometimes objects in PS don’t have a descriptive property name or the information of an object could use a little bit of formatting to better fit our purposes. Take for example the VirtualMemorySize64 property of the processes running on Windows: That’s a big number. We can dig a bit further to check its type to […]
Iterate a shared network folder to look into domain users or security group permissions
The Get-Acl cmdlet can help us to obtain the access control list of a resource, for example a directory. With this information we can determine the permissions that a domain user or a security group has over a resource. Let’s check the help for this command: The Get-Help shows three different sets of parameters for […]
Moving users or computers in AD with the Move-ADObject cmdlet
According to the official documentation, Move-ADObject “Moves an Active Directory object or a container of objects to a different container or domain”. The straightforward noun-verb structure of PS also suggest what you can do with it. Let’s review the syntax: Both -Identity and -TargetPath are obligatory parameters. Regarding -Identity, we can use a distinguished name […]
Checking and comparing user AD group membership
In the AD module for PS there’s an easy cmdlet that allow us to check the groups a user is member of. We’re talking about Get-ADPrincipalGroupMemberShip. Let’s check the sintaxis: Interpreting the sintaxis, we are able to conclude the following: Because “-Identity” parameter and value “<ADPrincipal>” aren’t enclosed in square brackets we know is mandatory. […]
Keep your Ubuntu Server tasks running with Screen
Sometimes it can be useful to leave your server working on a task in case you need to disconnect yourself from it. With screen we can create and resume sessions easily. To install screen on Ubuntu, type the following command: Is always a good idea to update the local package list from your server by […]
Remote port forwarding with SSH
Let’s say you are developing an application in your computer, and you want others to see it. For that, you first host the app locally making it accessible from localhost. Then, you wonder what you can do to share it with people outside of your network. Remote port forwarding SSH can solve this problem. In […]
Get the hash value of a file with PowerShell
Sometimes is useful to be able to look for the hash value of a file without using third party software. Since PowerShell comes installed by default with Windows and it has an specific cmdlet for this purpose, this process can be very simple. Using Get-FileHash cmdlet This cmdlet, according to Microsoft Documentation, “Computes the hash […]