Rexxer

Some tips for me and other

Windows

Powershell + turn on system protection

enable-computerrestore -drive “c:\” vssadmin resize shadowstorage /on=c: /for=c: /maxsize=3%

Create UEFI booting flash

run diskpart and: select disk N clean create partition primary format fs=fat32 quick active assign list volume exit Copy Win10 files from ISO to flashdrive.

Powershell + Remote

Run powershell on the remote PC and run it: Enable-PSRemoting -Force Set-Item wsman:\localhost\client\trustedhosts * Restart-Service WinRM Test the connection from the local PC: Test-WsMan COMPUTERNAME Run the remote command: Invoke-Command -ComputerName COMPUTERNAME -ScriptBlock { COMMAND } -credential USERNAME

Get-ADUser scripts

Get users with the specified manager: Get-ADUser -Filter { Manager -eq “CN=Ivan Ivanov,OU=Users,DC=contoso,DC=com” } -Properties Mal, Title | ft Name, Title Do not forget to run before: import-module ActiveDirectory Get info about users which are in the group: Get-ADGroupMember groupname | Get-ADUser -Properties Name, Title | ft Name, Title

Certificate + Add a private key

Copy-pasted from: http://www.entrust.net/knowledge-base/technote.cfm?tn=7905 Entrust Certificate Services Support Knowledge Base Audience: General Last Modified: 2011-01-18 08:42:02.0 TN 7905 – What are the steps to recover the private key of an SSL certificate in an IIS environment? Problem: The SSL certificate is installed but the private key is missing. What are the steps to recover the private […]

WSUS + Repairing

You can try to connect to Windows Internal Database with SQL manager(run as admin) by \\.\pipe\MICROSOFT##WID\tsql\query link. In my case I found SUSDB with Pending repairing status. I took it offline and then online after 2-3 attempts. I could backup it and shrink but this didn’t help – the DB was about 6Gb. So I […]

Sysprep your Windows OS for more than 3 times

Copy-pasted from: http://system-center.me/miscellaneous/sysprep-your-windows-os-for-more-then-3-times/ It can happen, the need of re-syspreping an already syspreped machine, why ? maybe you lost your Image master. so.. you running the setup process, adding the changes you want, relocating the XML answerfile, running the sysprep with /generalize switch.. the process is running for few seconds and then the sysprep window is […]

Delete an upgrade notification to Windows 10

WUSA /Uninstall /KB:3035583

Windows 10 + Sysprep + Generalize + Error

I couldn’t run Sysprep on Windows 10 because some packages were incompatible with Sysprep. But you can do it without the option Generalize. Fix: Run Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation – you will see what the user blocks running Login with this users and run: Remove-AppxPackage -Package <invalid packagefullname […]

My python 2.7 script to parse wheather data and speak it

# -*- coding: utf8 ## encoding=utf8 import urllib import re from bs4 import BeautifulSoup import os import subprocess import codecs import sys from setupcon import setup_console setup_console(‘cp866’) sys.getdefaultencoding() reload(sys) sys.setdefaultencoding(“cp866”) # Get the page sock = urllib.urlopen(“http://tvoj.kharkov.ua/help/weather/”) htmlSource = sock.read() sock.close() #print htmlSource # soup = BeautifulSoup(htmlSource, “html5lib”) string = soup.h1 results = soup.find_all(‘span’, limit=10) […]

Previous Posts Next posts