Compare two folders with Powershell
This script checks first that folders exist, then that filename are the same, and then that file Hash is the same
Kenneth Qvistgaard Dalbjerg, IT Konsulent i århus
This script checks first that folders exist, then that filename are the same, and then that file Hash is the same
To show the queue in sophus, from CLI type:
1 |
chroot /var/storage/chroot-smtp /bin/exim -bp |
To delete a specific mail type
1 |
chroot /var/storage/chroot-smtp /bin/exim -Mrm {mailid} |
example:
1 |
chroot /var/storage/chroot-smtp /bin/exim -Mrm 1daHZv-000EaR-0A |
To see how many mails, there are in queue, you can type:
1 |
chroot /var/storage/chroot-smtp /bin/exim -bpc |
If you need to give auser access to users calendar, based on if there are member of an group, this is the way. Start Exchange Management Shell
1 2 3 4 5 6 7 8 9 10 11 |
$users = Get-ADGroupMember [groupname] | select -ExpandProperty name foreach ($user in $users) { $Mailbox = Get-Mailbox $user #The Calendar, is name "Kalender" in danish add-MailboxFolderPermission -identity “$($Mailbox.Name):\kalender” -AccessRights Editor -User [username] set-MailboxFolderPermission -identity “$($Mailbox.Name):\kalender” -AccessRights Editor -User [username] #English calendar add-MailboxFolderPermission -identity “$($Mailbox.Name):\calendar” -AccessRights Editor -User [username] set-MailboxFolderPermission -identity “$($Mailbox.Name):\calendar” -AccessRights Editor -User [username] } |
How to generate a CSR in Tomcat with Keytool Create a New Keystore You will need to create a new Keystore, this is done by this command:
1 |
keytool -genkey -alias domainname.prefix -keyalg RSA -keysize 2048 -keystore /path/domainname.prefix.jks |
When the commands ask for the...
How to list all enabled user in active directory:
1 |
Get-ADUser -filter {Enabled -eq $True} -Properties "DisplayName","emailaddress" | select name,emailaddress |
How to list all enabled user in active directory, for a given OU:
1 |
Get-ADUser -SearchBase "OU=Accounts,OU=RootOU,DC=ChildDomain,DC=RootDomain,DC=com" -filter {Enabled -eq $True} -Properties "DisplayName","emailaddress","title" | select name,emailaddress |
To get sum of all desktops in the Citrix Xendesktop (5) farm, just run this commands: Asnp Citrix.* Get-BrokerDesktopGroup | measure-object -property TotalDesktops -sum | select sum
Here is a quick ucfirst function. First case in a word or string is going to be uppercase
function ucfirst(str)
bogstav = left(str,1)
bogstav = ucase(bogstav)
ucfirst = bogstav & right(str,1)
end function
…
Vil blot sige at jeg langt om længe blev færdigt med www.sundsvenstre.dk. Jeg har lavet designet og programmering bag sitet.
…
Here is the link to the DEMO: http://www.dalbjerg.nu/script/popup.php and here is the link to the sourcecode: …
Lidt kommandoer til at arbejde med mySQl
Koble sig til en mySQL server
$mysql_server = “localhost”;
$mysql_bruger = “bruger”;
$mysql_password = “password”;
$mysql_database = “database”;
if (!mysql_connect(“$mysql_server”,”$mysq…
Sidste kommentar