USB Minne bootbart…

Preppa USB minnet

LIST DISK
Notera ner nummret på disken och kör med det nummret i resten av scriptet I detta Exempel är den på plats 1.
SELECT DISK 1
CLEAN
CREATE PARTITION PRIMARY
SELECT PARTITION 1
ACTIVE
FORMAT FS=NTFS Label=”Bootabel USB!” QUICK
ASSIGN
EXIT

Gå nu till DVDn med den image du vill lägga på USB minnet.
(I detta fall 2008r2 sp1)

Ställ dig i mappen d:\boot
Kör kommandot
Windows7, 2008 och nyare: BOOTSECT.EXE / NT60 H: (H: = enheten på ditt USB minne!)
XP BOOTSECT.EXE /nt52 H:

Kopiera nu ner innehållet på DVDn till H:\
Klart, bootar nu om du har satt allt rätt i datorns BIOS!

 

Hyper-v network issue – NIC is already Bound…

Multi homes Hyper-v servers får i bland egenheten att en extra virtuell switch finns , som inte är kopplad alls..

Lös detta genom följande kommanden (installerar om Microsoft Virtual Netowrk Switch Protocols)

netcfg -u vms_pp

netcfg -c p -i vms_pp

Exchange 2010

Samlar lite kommandon som är bra att ha här…

Funktioner:

Antispam – Enable på serverns via script

1. %system drive%/Program Files\Microsoft\Exchange Server\V14\Scripts folder.
./install-AntispamAgents.ps1
2. After the script has run, restart the Microsoft Exchange Transport service by running
the following command.
Restart-Service MSExchangeTransport
Powershell script to check spam reports form blocked messages
Get-AgentLog | Where {$_.Action -ne ”AcceptMessage” -and $_.IPAddress -ne $() } | Group-Object Reason | ft count,name -Autosize
Get-AgentLog | Where {$_.Action -ne ”AcceptMessage” -and $_.IPAddress -ne $() } | Group-Object Agent | ft count,name -AutoSize
Get-AgentLog | Where {$_.Action -ne ”AcceptMessage” -and $_.IPAddress -ne $() } | Group-Object Recipients| ft count,name -AutoSize
Get-AgentLog | Where {$_.Action -ne ”AcceptMessage” -and $_.IPAddress -ne $() }
Whitelisting:
Set-ContentFilterConfig -BypassedSenders Sender1@test.com,Sender2@test.se
Visa whitelistingen med:
Get-ContentFilterConfig

Windows Debugging

To use the Microsoft Symbol Server
  1. Make sure you have installed the latest version of Debugging Tools for Windows.
  2. Start a debugging session.
  3. Decide where to store the downloaded symbols (the ”downstream store”). This can be a local drive or a UNC path.
  4. Set the debugger symbol path as follows, substituting your downstream store path for DownstreamStore.
    SRV*DownstreamStore*https://msdl.microsoft.com/download/symbols

WMI trixeri

WBEMTest är ett tool för att kunna hitta WMI poster som finns i ett system.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Keep Ras connections…

Ibland kan man behöva behålla en vpn förbindelse även om man byter konto… när man tex joinar en domän….

Då finns en register nyckel som gör just detta… (omstart krävs tydligen!)

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
”KeepRasConnections”=”1”

KeepRasConnections: REG_SZ
Range: 0 or 1
Default: 0 (disabled)

https://support.microsoft.com/kb/158909

Windows Image Clean up – DISM

Renas ut gamla uppdateringar i WinSxS folder på olika Windows varianter…


Windows 7 – 2008 R2

%windir%\system32\dism.exe /Online /Cleanup-Image /spsuperseded


Windows 8.1 – 2012 R2

Dism.exe /online /Cleanup-Image /StartComponentCleanup
(Tog 2014-04-13cirka 40 min att köra på min Win8.1 I7 ResultatFöre: 23.4 GB Efter: 21.3 2Gb of data removed 🙂 )

Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
”All existing service packs and updates cannot be uninstalled after this command is completed.”
(Tog 2014-04-13 10 min på min 2012 R2… Resultat Före:14.9 GB Efter: 14.6 … not so big deal…)

Dism.exe /online /Cleanup-Image /SPSuperseded
Tar bort möjligheten till att avinstallera ett Service pack… om något sådan nu finns…


RDS Remove Powershell, Server manager in RDS user desktop (Works!)

After searching i could not find any decent answer to from where and why.
But when running procmon while logging on a user, it turns out that those icons are being generated out from the same icons in the all users profile so to prevent this Deny Read access to those shortcuts in there.
To do this with Group Policy, open the policy that is being applied to the Terminal servers and Expand Computer configuration.
Browse down to – >Windows Settings -> Security Settings
Right Click ”File System” and select ”Add File” and add the files listed below.

%AllUsersProfile%\Microsoft\Windows\Start Menu\Programs\Accessories\Windows PowerShell\Windows PowerShell.lnk
%AllUsersProfile%\Microsoft\Windows\Start Menu\Programs\Administrative Tools\Server Manager.lnk
%AllUsersProfile%\Microsoft\Windows\Start Menu\Programs\Administrative Tools\Windows PowerShell Modules.lnk

TITLE : How to Set Up a Private Network Over the Internet Using PPTP

Log on to your computer using a local user account with administrator rights.
Configure your registry so that DUN connections are preserved after you log off.
 

To do so, use the following steps.

Add a new string value named KeepRasConnections to the following registry key:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlog
Set the string value for KeepRasConnections to 1.
Use Dial-Up Networking to connect to your ISP.
Use Dial-Up Networking to connect to your PPTP server.
Click Start, point to Settings, click Control Panel, and then double-click Network.
On the Identification tab, click Change, click Domain, type your Windows NT domain name in the Domain box, and then click OK.
If you receive a ”Welcome” message from the domain, click OK.
Click Close.
When you are prompted to restart your computer, click Yes.
Log on to your computer using a local user account with administrator rights.
Use Dial-Up Networking to connect to your ISP.
Click Start, click Shut Down, click ”Close all programs and log on as a different user,” and then click OK. The Dial-Up Networking connection to your ISP should remain connected.
When you are prompted, press CTRL+ALT+DELETE to log on.
Type your domain user name and password. In the Domain box, click the name of your Windows NT domain. Click the Logon Using Dial-Up Networking check box to select it, and then click OK.
In the Phone Book Entry To Dial box, click the phone book entry that you use to connect to your PPTP server, and then click Dial. Confirm your user name, password, and domain, and then click OK.
 

ADMX arkiv

Admx filer kan vara svårt att finna snabbt…
Samlar här lite länkar för att sanbbt kunan finna dessa …

2008r2/W7
https://www.microsoft.com/downloads/en/details.aspx?FamilyID=16f69ffe-d51b-4e02-9d02-3e57f3ccd490

IE8
https://www.microsoft.com/downloads/en/details.aspx?FamilyID=16f69ffe-d51b-4e02-9d02-3e57f3ccd490

Placering av ADMX filer.
CentralStore

When you use a central store, the GPMC reads the entire set of Administrative Template files when you edit, model, or report on a GPO.
Therefore, the GPMC must read these files from across the network.´┐¢
The central store consists of the following:
A root-level folder, which contains all language-neutral .admx files. For example, create the root folder for the central store on your
domain controller at this location: %systemroot% \sysvol\domain\policies\PolicyDefinitions

Subfolders, which contain the language-specific .adml resource files.
Create a subfolder of %systemroot%\sysvol\domain\policies\PolicyDefinitions for each language that you will use.
For example, create a subfolder for United States English at this location: %systemroot% \sysvol\domain\policies\PolicyDefinitions\EN-US

PolicyDefinitions folder in the local computer.´┐¢
.admx files are stored in this location: %systemroot%\PolicyDefinitions
.adml files are stored in this location: %systemroot%\PolicyDefinitions\<ll-cc>

where ll-cc represents the language identifier, such as en-us for English United States