Type in Start + Run window:
notepad %localappdata%low\sun\java\deployment\security\exception.sites
Then type all the addresses you want to open with Java without security error. It’s useful for example with Intel server motherboards.
Type in Start + Run window:
notepad %localappdata%low\sun\java\deployment\security\exception.sites
Then type all the addresses you want to open with Java without security error. It’s useful for example with Intel server motherboards.
For example to start running DHCP or DNS server, you need to have static IP configuration. If you already have an DHCP Server configured IP configuration, you might want to use the same IP address and DNS configuration. To do this automatically, use this script:
$nic = Get-WmiObject -Class Win32_NetworkAdapterConfiguration | ogv –PassThru
#convert to static
$IPAddress = $nic.IPAddress[0]
$IPSubnet = $nic.IPSubnet[0]
$DefaultIPGateway = $nic.DefaultIPGateway
$DNSServerSearchOrder = $nic.DNSServerSearchOrder
$nic.EnableStatic($IPAddress, $IPSubnet)
$nic.SetGateways($DefaultIPGateway)
$nic.SetDNSServerSearchOrder($DNSServerSearchOrder)
#enable dhcp for ip and dns
$nic.EnableDHCP()
$nic.SetDNSServerSearchOrder()
First section is for selecting the correct network adapter. By running the second section, the current information is copied as static configuration. By running the third part, DHCP default configuration is set.
To remove empty folders from your D: drive, use following command:
$folders = gci d:\ -r | ? PSIsContainer -eq $True
$folders.Count
$emptyfolders = $folders | ? {$_.GetDirectories().Count -eq 0 -and $_.GetFiles().Count -eq 0}
$emptyfolders.Count
$emptyfolders | select * | ogv
$emptyfolders | Remove-Item
It has some room for improvement (i had to do multiple passes, because after cleaning up some other folders appeared empty (before they contained only empty folders inside it). And dont use it on C: drive, there might be useful empty folders.
To register a nightly job:
Register-ScheduledJob restart {Restart-Computer -Force} -Trigger (New-JobTrigger -At 01:00 -Daily) -ScheduledJobOption (New-ScheduledJobOption -RunElevated)
To unregister the nightly job:
Unregister-ScheduledJob restart
To view jobs, use taskschd.msc (Task Scheduler) and go to \Microsoft\Windows\PowerShell\SceduledJobs folder and fine tune them if needed.
To get screen resolutions and positions using powershell, you can use this oneliner:
Add-Type -A System.Windows.Forms;[System.Windows.Forms.Screen]::AllScreens|ft *d*
In my example I have this screen layout:
The output in my case is like this:
Let’s assume, you have domain network and you are using domain admin to do the trick. Also the neighbors computer must be running quite fresh windows version (i tried windows 10 only, let me know when older ones also work).
First of all you need psexec from sysinternals to run something on other computer. http://live.sysinternals.com/ is one good starting point for getting that tool.
Next open your command prompt as the domain admin user and type the following command (yes, it is a one-liner):
psexec \\neighbor cmd /c powershell [Reflection.Assembly]::LoadWithPartialName('System.Speech');$object = New-Object System.Speech.Synthesis.SpeechSynthesizer;$object.Speak('i know what you did last summer')
where neighbor is the name of the neighboring computer and last string is the text to speak. After some waiting the neighboring computer should talk to the default audio device.