W7 SP1 updates

Länkar samt pre/post Updates tillw7 sp1…
Pre deps… SP1
”Uppdatering som förhindrar felmeddelandet ”0xC0000034” när du försöker installera Windows 7 SP1 eller Windows Server 2008 R2 SP1
https://support.microsoft.com/kb/2533552/sv

Sp1 Download länk.
https://www.microsoft.com/sv-se/download/details.aspx?id=5842

PRE SP1 Rollups

An enterprise hotfix rollup is available for Windows 7 SP1 and Windows Server 2008 R2 SP1
https://catalog.update.microsoft.com/v7/site/Install.aspx?q=KB2775511&referringpage=Search.aspx

Direkt länkar
x86: https://download.windowsupdate.com/msdownload/update/software/updt/2013/03/windows6.1-kb2775511-v2-x86_f298cf30fae9f581550d783ac9ad57fcbc7f7587.msu
x64: https://download.windowsupdate.com/msdownload/update/software/updt/2013/03/windows6.1-kb2775511-v2-x64_ec18cc10e27faf443c17e7a8073c9eba773eb13e.msu

 

Wirless profiles

Wirless profile export/import distribution med GP

Rem Importera en exporterad wirless profil
netsh wlan add profile filename=”Wireless Network Connection-qui.xml”

rem exporterar alla profiler med lösenord i klartext !!!!!!
netsh wlan export profile key=clear

Grouppolicy …

wireless

GUI or NOT 2012

Windows Server 2012 guide to add GUI when only core is installed

 

Get-ExecutionPolicy
Set-ExecutionPolicy -ExecutionPolicy Unrestricted

Get-WindowsImage -ImagePath <path to wim>\install.wim
Ger instance number of the image we want to get files7parts from…
Example: Get-WindowsImage -ImagePath D:\sources\install.Wim

Install-WindowsFeature Server-GUI-Mgmt-Infra,Server-GUI-Shell -Restart -Source wim:D:\sources\install.wim:2
inställs GUI on a server with just console…

 

REMOVE GUI

DONOTE ! Demands a couple of restarts

Uninstall-WindowsFeature Server-Gui-Shell -Restart
Uninstall-WindowsFeature Server-Gui-Shell -Remove -Restart

 

 

 

 

 

Powershell – Copy files from UNC and elevate to get rights

Install.ps1

$identity = [Security.Principal.WindowsIdentity]::GetCurrent()
$principal = new-object Security.Principal.WindowsPrincipal $identity
if ($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) -eq $false)
{ $psArgs = ’-noprofile -nologo -executionpolicy bypass -file ”{0}”’ -f $MyInvocation.MyCommand.Path
Start-Process -FilePath ’powershell.exe’ -ArgumentList $psArgs -Verb RunAs
exit }

$Source = split-path -parent $MyInvocation.MyCommand.Definition
$dest=”C:\AXIS Camera Control”
if (!(Test-Path -path $dest)) {New-Item $dest -Type Directory} # Skapa katalogen om den saknas !
Copy-Item $Source\filer\* $Dest -recurse #Kopiera filerna…
Start-Process -FilePath ($dest + ”\AXISCameraControlSDK.exe”) #Starta SDK installationen
regsvr32 ($dest + ”\AxisCameraControl.ocx”)

Session controling…

@echo off
net pause Netlogon
net pause Server
net session /delete /y
echo.
echo Paused Server and all users are disconnected FORCED !
echo.
echo.
pause

@echo off

net continue Server
net continue Netlogon
echo Server now in execute mode !
pause

SUBs… grrr hard to remember :)

Net bits

Subnet mask

total-addresses per subnet

/20 255.255.240.0 4096
/21 255.255.248.0 2048
/22 255.255.252.0 1024
/23 255.255.254.0 512
/24 255.255.255.0 256
/25 255.255.255.128 128
/26 255.255.255.192 64
/27 255.255.255.224 32
/28 255.255.255.240 16
/29 255.255.255.248 8
/30 255.255.255.252 4