Windows 10 allows the user to schedule when updates are applied, but not when they are downloaded.
One way to control Windows 10 update downloads is to manually define the wifi connection as a metered connection, and then to manually set it back to unmetered again.
My ISP allows free downloads between midnight and 6am. It would therefore be best if I could schedule Windows updates to happen during this time.
Is it possible to use Task Scheduler and a Windows script to change from metered to unmetered on a schedule.
If yes, any pointers on how to do it?
Thanks
Brendon
First, use this command to get names of your wlan profiles:
netsh wlan show profiles
Second, use this command to get current settings:
netsh wlan show profile name="Your profile name"
It prints "Cost : Fixed" if connection is metered, "Cost : Unrestricted" if non-metered
To change between metered and non-metered use these:
netsh wlan set profileparameter name="Your profile name" cost=Unrestricted
netsh wlan set profileparameter name="Your profile name" cost=Fixed
Thanks JIT. Just to add to that, you can use
netsh mbn
to run the same commands for a cellular connection.
Related
I have access to a Samba server using a username and password. To logging the server on windows 10, I put its IP address on the RUN and then input my username and password. Then I can access the data stored in the server normally. However, I don't know how to log off (or Sign out) from that server.
I followed this tutorial about how to access the server, but it does not mention the log off process. I need to log-off and log-in again with my username and password whenever I need to access the server.
Can anyone help?
"Try to restart your workstation".
TL;DR
Open CMD, type NET USE X: /DELETE or NET USE \\SERVER\SHARENAME /DELETE
where X: is your drive and \SERVER\SHARENAME your fully qualified share name.
Step by Step
View all network connections:
NET USE
Example Output:
Status Local Remote Network
--------------------------------------------------------------------------------
OK \\name\IPC$ Microsoft Windows Network
OK \\name2\folder Microsoft Windows Network
Using the Remote name, we can disconnect using on of the following statements, depending on which one we want to disconnect from:
net use \\name /delete
OR
net use \\name2\folder /delete
Example Output: (given the above \name\IPC being connected))
Net use \\name /delete
\\name was deleted successfully.
Another way, to disconnect from every share is to execute net use * /delete. This will disconnect every Network share you're currently connected to. This is still quicker than logging off and back on.
Bonus: make a script to do it
If you want to create an icon to automatically disconnect all network shares (using a GUI method), you can do the following:
Right-click on a blank area of the folder you want to add the shortcut to.
Point to New->Shortcut and click.
Type net use * /delete /y for the Command, then click Next.
Give it a name, and click Finish.
You can also specify a certain network share, if known in advance, and use that one instead. Using the /y automatically select the yes option in the command.
open notepad:
#echo off
::Disconnect user
net use * /delete /y
msg * /time:5 "You have been successfully Disconnected"
Copy paste save as a bat (file Extention " *.bat ", create a shortcut edit the shortcut to an icon of your choosing...
upon double click, the command will be run and a gui popup box will say the message and go away in 5 seconds or wait 5 seconds till appearing...
we use this quite a bit at work :)
I downloaded the raspi image from MS.
I have the issue where my computer thinks my admin is blocking the iot dashboard so I used the dism workaround to flash the sd card.
Device boots with defaults and I can log in via powershell as detailed in the MS docs. Administrator/p#ssw0rd
I change machine name using
set computername mycoolname
Then I create a new account for myself and add it to the local admin group.
Then I change the default admin password and reset.
When the raspi comes back up the hostname is still minwinpc and neither the built in admin account or the new one I created will work.
I tried the default password and the one I changed it to.
Anyone else have these issues? Ive tried waiting on the device to settle in, as others have reported that it can take time. Its not making a difference.
You may use the wrong command "set computername mycoolname". You need use "setcomputername mycoolname".
I do the following tests on the latest version 10.0.17763.1 and all work for me.
It will give the result of changing name like this:
Change password. No need reboot for password change.
For adding a user, for example:
net user rita windowsiot /add
net localgroup Administrators rita /add
Check the user added:
net localgroup administrators
Use the newly added user "rita" to login:
I'd like to configure Windows programmatically to use a user-specified SNTP server. Is there a function in the Windows API for that?
You can do it through the registry:
Registry entries for the W32Time service
Configuring the Time Service: NtpServer and SpecialPollInterval
Alternatively, you could interact with the W32tm console utility.
The Date and Time control panel (timedate.cpl) does this with a call to W32TimeSetConfig from w32time.dll, but that appears to do nothing but set the NtpServer value in HKLM\System\CurrentControlSet\Services\W32Time\Parameters.
When running the psexec command to remotely install or execute something on a sever on the same network the following error was displayed.
Couldn't access ServerName
The network name cannot be found
Make sure that the default admin$ share is enable on ServerName
Most references suggested that you add the following to the registry, but in my case this was already added to the server. This did not resolve the issue.
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
and create or modify a REG_DWORD value LocalAccountTokenFilterPolicy and set its value to 1
Solution:
You need to add the 'admin$' share which is your C:\Windows location.
Go to C:\windows and right-click --> Properties
Hit advance sharing
Click the check box Share this folder
Enter the name admin$ and hit Permissions
I would recommend removing 'Everyone' and adding just the users that the PsExec command will use to execute.
Run the PsExec command again and this should resolve your issue.
Edit:
You can also turn on your AutoShareServer in the registry, which will automatically create the admin shares.
Start regisry regedit
Search for key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\AutoShareServer
Change the AutoShareServer key to 1
You can also enable amins$ share by enabling File and Printer Sharing (SMB-In) Firewall Rule.
Go to Control Panel > System ans Security > Windows Defender Firewall > Advance Settings > Inbound Rules. Right click on File and Printer Sharing (SMB-In) from the list and select Enable Rule`. Normally, there are two File and Printer Sharing (SMB-In), one is for Domain profile and one is for Public & Private profile. I'm not sure which profile should be applied, Domain or Public or Private. For me, it's Domain profile.
In my case it was a network problem like mentioned in the error message.
I needed to allow SMB traffic on port 445 on the target machine. PSExec worked straight away after adding the firewall rule to allow that traffic.
My OS is windows7 64 bits.
I'm in a corporate environment. In order to have internet connectivity I have IE configured to use a automatic configuration proxy script.
Additionally I connect into an external company dial-up VPN (via internet). When connecting into the VPN I see that my hosts file are modified and the route print is changed too. The VPN dial-up connection uses another proxy automatic configuration script (under dial-up and VPN settings).
I'm able to see the contents of the two automatic configuration scripts as well as the route print info.
I have a .Net1.1 winforms app that uses WebClient to download an xml file from a web server.
When connected into the VPN:
The winforms app is not able to download the file ("server cannot be reached" error).
If I browse to the same URL within IE I'm able to download the file.
Moreover when I start Fiddler to inspect the http sessions, the winforms app is able to download the xml file.
Running netsh->proxy, system32 and SysWow64 versions show Direct access.
I suspect the problem is somehow related to proxy configurations but I don't know where to look first.
Any help on putting things in order would be really apreciated...
The problem could be a result of TCP tuning on you windows7 machine. Try the following then restart your computer.
Click on Start button.
In the Search box, type in Command Prompt. Command Prompt will show up in
the search results.
Right click on Command Prompt icon and select Run as administrator.
Enter the admin credential and you are ready to go.
Once you get to the elevated command prompt:
Type all the commands below and click enter after each one.
netsh int tcp set global autotuninglevel=disabled
netsh int tcp set global autotuninglevel=disabled
netsh interface tcp set global rss=disabled
netsh interface tcp set global autotuninglevel=disabled
netsh interface tcp set global congestionprovider=none
Just for reference,
It turns out that .net framework 1.1 WebClient doesn't understand automatic proxy configuration within its defaults settings:
<system.net>
<defaultProxy>
<!--
The following entry enables reading of the per user (LAN) Internet settings.
Adding additional proxy settings, without first setting to "false",
will individually override. Note that "Automatic configuration" and
"automatic configuration scripts" cannot be read.
<proxy> settings:
usesystemdefault="[true|false]" - Read settings from Internet Options (see above)
proxyaddress="[string]" - A Uri string of the proxy server to use.
bypassonlocal="[true|false]" - Enables bypassing of the proxy for local resources.
-->
<proxy usesystemdefault="true" />
</defaultProxy>
</system.net>
One posible workaround is to manually add the proxyadress in the config file
<system.net>
<defaultProxy>
<proxy usesystemdefault="false" proxyaddress="http://myproxy:myport" />
</defaultProxy>
</system.net>