Rexxer

Some tips for me and other

Exchange 2010 + delete a specific e-mail from all the boxes

1. You must have a special permissions for it: import-export mailboxes, see it on the MS Technet. 2. Check that it will be work for this e-mail correctly: Get-Mailbox-ServerYourServer| Search-Mailbox-SearchQuery’Subject:”YouSubject” and Body:”Phrase in body”‘-targetmailbox”YourOwnMailboxForReport”-targetfolder”Inbox”-logonly-loglevelfull After this command you’ll receive a letter with CSV-log. Check it. If everythin is ok go to the next step. 3. […]

Windows Server 2012 + Terminal Services + Sessions script

My script for connecting to the user’s sessions without GUI: Write-host “Getting sessions list …” Get-RDUserSession | ft Username, UnifiedSessionId, SessionState, HostServer -GroupBy Sessionstate $sess = read-host “Enter session’s number: ” If ($sess -ne “”) { Mstsc /shadow:$sess /control /noConsentPrompt Write-host “Connecting and exiting.” } Else { Write-host “No sessions were choosen – Exiting.” }

Windows 2012 Terminal Services + Thinstation + cursor issue

I have a Windows Server 2012 and users connect to it via RDP. They have thin clients Wyse 3150 with ADM Geode. If they use built client they get artifacts on a screen after 5-10 min. If they use Linux client from PXE (Thinstation 2.2.2i) they have issues with a cursor – it disappears suddenly […]

Windows 8.1 + WSUS + .net3.5 installation failed

You have to make a change in your local or domain group policy. If it’s win2k8 domain – the local PC policy (gpedit.msc). That’s there: Administrative Templates – System – “Specify settings for optional component installation and component repair”. Set it to “Enabled” and check the box “Contact Windows Update directly to download repair content […]

Windows 2008R2 WDS + TFTP

I tested thinstation on WDS and it always complain on config files – couldn’t find. I checked TFTP root folder for WDS: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\WDSServer\Providers\WDSTFTP\RootFolder And add /* and \* there: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WDSServer\Providers\WDSTFTP\ReadFilter  

Windows 2012 Server + Powershell + registry + disabling IPv6

You can easy disable IPv6 with command: New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters -Name DisabledComponents -PropertyType DWord -Value 0xffffffff and this is example how to work with registry with powershell.

RDP connection error due certificate

Recently I’ve deleted a machine certificate from a certificate store and couldn’t connect to it via RDP. Fix: Run these commands in powershell: certutil -store “Remote Desktop” | findstr “Serial Before After” find deleted certificate and use it in the next command: certutil -delstore “Remote Desktop” ThumbOfCertificate Now you can connect to this PC via RDP – the machine will generate the […]

FreeBSD + e-mail alert for ssh connection

Add this string to your /etc/pam.d/sshd: session optional pam_exec.so /etc/alert.sh where alert.sh is: #!/bin/sh echo ‘Shell Access on:’ `date` `who` | mail -s “Access from `who`” admin@local.com    

Windows + reset registry permissions to default

Use this tool from MS: subinacl Create the command file like reset.cmd: cd /d “C:\Program Files (x86)\Windows Resource Kits\Tools” subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f subinacl /subdirectories %windir%\*.* /grant=administrators=f /grant=system=f secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose pause Edit the first […]

Windows Server 2012 + Terminal + Connect to a remote session

Powershell commands: List of sessions: Get-RDUserSession | ft Username, UnifiedSessionId, SessionState, HostServer, ApplicationType -GroupBy Sessionstate Connect to the session #2: Mstsc /shadow:2 /control

Previous Posts Next posts