This is how you change the amount of time notifications (or balloons) stay open: 5-300 seconds
reg add “HKEY_CURRENT_USER\Control Panel\Accessibility” /v MessageDuration /t REG_DWORD /d 30 /f
Lab Core | The Lab of MrNetTek
A blog about IT, technical solutions, and code.
Use this method—which can easily be scripted—to change the SCCM client connectivity type from Intranet to Always Internet. I found this to be useful when setting up our remote computers to be directed to our DMZ-PKI (a single public-facing server). Once this is set, it doesn’t matter if the users are on site or off site, they are managed by the DMZ endpoint.
Why do this? Due to the complexities of some networks, when remote users travel to an on site facility, [sometimes] their workgroup joined computers will not automatically detect and switch to the local SCCM distribution point, which causes the machines to fall into a non-managed state—this solution prevents that from happening. The computers are always managed through the DMZ. This cuts down on management complexity, DNS connectivity issues associated with remote computers, and guarantees machines remain managed.
:: Apply Reg Key
Reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CCM\Security” /v ClientAlwaysOnInternet /t reg_dword /d 1 /f
:: Restart CM Service
Sc stop CcmExec
Sc start CcmExec
Screenshot
Notes
Set Always Internet using ccmsetup
ccmsetup.exe /native SMSSITECODE=ABC CCMALWAYSINF=1 CCMHOSTNAME=HOSTCOMPUTERNAME SMSMP=SCCMMPSERVER SMSSIGNCERT=SITESIGNINGCERT
PowerShell Command
Get-WmiObject -namespace root\ccm\locationservices -class SMS_ActiveMPCandidate
Output
__GENUS : 2
__CLASS : SMS_ActiveMPCandidate
__SUPERCLASS :
__DYNASTY : SMS_ActiveMPCandidate
__RELPATH : SMS_ActiveMPCandidate.MP=”xyz.abc.com”,MPBGRFallbackType=”None”,Type=”Internet”
__PROPERTY_COUNT : 14
__DERIVATION : {}
__SERVER : TEST-COMPUTER
__NAMESPACE : ROOT\ccm\locationservices
__PATH : \\TEST-COMPUTER\ROOT\ccm\locationservices:SMS_ActiveMPCandidate.MP=”xyz.abc.com”,MPBGRFallbackTy
pe=”None”,Type=”Internet”
Capabilities : <Capabilities SchemaVersion=”1.0″><Property Name=”SSL” Version=”1″/><Property Name=”SSLState”
Value=”63″/></Capabilities>
Index : 1
Locality : 0
MasterSiteCode :
MP : xyz.abc.com
MPBGRFallbackType : None
MPFallbackTime : 0
Protocol : OS
Reserved1 :
Reserved2 :
SiteCode :
State :
Type : Internet
Version : 8634
PSComputerName : Test-Computer
Or, return just the MP on Internet
(Get-WmiObject -Namespace Root\Ccm\LocationServices -Class SMS_ActiveMPCandidate | Where-Object {$_.Type -eq "Internet"}).MP
using System; class Program { public static void Main() { string userString; Console.WriteLine("Enter a word:\n"); userString = Convert.ToString(Console.ReadLine()); Console.WriteLine("\nWord is = {0}", userString); string revString = Reverse(userString); Console.WriteLine("Its reverse is = {0}", revString); if (userString == revString) Console.WriteLine("\nWord is a palindrome.\n"); else Console.WriteLine("\nWord is not a palindrome.\n"); Console.ReadLine(); } public static string Reverse(string s) { char[] charArray = s.ToCharArray(); Array.Reverse(charArray); return new string(charArray); } }
Output
Notes
Some further research for you…measuring the efficiency of different reverse methods.
using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; namespace ConsoleApplication1 { class Program { public static string ReverseUsingArrayClass(string text) { char[] chars = text.ToCharArray(); Array.Reverse(chars); return new string(chars); } public static string ReverseUsingCharacterBuffer(string text) { char[] charArray = new char[text.Length]; int inputStrLength = text.Length - 1; for (int idx = 0; idx <= inputStrLength; idx++) { charArray[idx] = text[inputStrLength - idx]; } return new string(charArray); } public static string ReverseUsingStringBuilder(string text) { if (string.IsNullOrEmpty(text)) { return text; } StringBuilder builder = new StringBuilder(text.Length); for (int i = text.Length - 1; i >= 0; i--) { builder.Append(text[i]); } return builder.ToString(); } private static string ReverseUsingStack(string input) { Stack<char> resultStack = new Stack<char>(); foreach (char c in input) { resultStack.Push(c); } StringBuilder sb = new StringBuilder(); while (resultStack.Count > 0) { sb.Append(resultStack.Pop()); } return sb.ToString(); } public static string ReverseUsingXOR(string text) { char[] charArray = text.ToCharArray(); int length = text.Length - 1; for (int i = 0; i < length; i++, length--) { charArray[i] ^= charArray[length]; charArray[length] ^= charArray[i]; charArray[i] ^= charArray[length]; } return new string(charArray); } static void Main(string[] args) { int cycleCount = 20; string testString = string.Join(";", new string[] { new string('l', 10), new string('e', 10), new string('v', 10), new string('e', 10), new string('l', 10), }); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); for (int i = 0; i < cycleCount; i++) { Console.WriteLine(ReverseUsingCharacterBuffer(testString)); } stopwatch.Stop(); Console.WriteLine("ReverseUsingCharacterBuffer: " + stopwatch.ElapsedMilliseconds + "ms\n"); stopwatch.Reset(); stopwatch.Start(); for (int i = 0; i < cycleCount; i++) { Console.WriteLine(ReverseUsingArrayClass(testString)); } stopwatch.Stop(); Console.WriteLine("ReverseUsingArrayClass: " + stopwatch.ElapsedMilliseconds + "ms\n"); stopwatch.Reset(); stopwatch.Start(); for (int i = 0; i < cycleCount; i++) { Console.WriteLine(ReverseUsingStringBuilder(testString)); } stopwatch.Stop(); Console.WriteLine("ReverseUsingStringBuilder: " + stopwatch.ElapsedMilliseconds + "ms\n"); stopwatch.Reset(); stopwatch.Start(); for (int i = 0; i < cycleCount; i++) { Console.WriteLine(ReverseUsingStack(testString)); } stopwatch.Stop(); Console.WriteLine("ReverseUsingStack: " + stopwatch.ElapsedMilliseconds + "ms\n"); stopwatch.Reset(); stopwatch.Start(); for (int i = 0; i < cycleCount; i++) { Console.WriteLine(ReverseUsingXOR(testString)); } stopwatch.Stop(); Console.WriteLine("ReverseUsingXOR: " + stopwatch.ElapsedMilliseconds + "ms\n"); Console.ReadKey(); } } }
Executed in Spyder 3.3.2.
# function def SumFunction(Value1, Value2): # print line print('Let\'s add two numbers!') # print line, perform addition print (str(Value1) + ' + ' + str(Value2)+ ' = ' + str((Value1 + Value2))) # call function SumFunction(1,2)
Output
Notes
#include "stdafx.h" #include <iostream> using namespace std; void Rotate(string s, int len); int main() { char s[20]; // Input cout << "Enter string: "; cin >> s; string t = s; if (t.length() != 0) { cout << "\n------------\n"; Rotate(t, t.length()); cout << "\n------------"; } else cout << "Missing input!"; getchar(); getchar(); return 0; } void Rotate(string s, int len) { static int i = 0; cout << "\""; for (int j = i; j<len; ++j) { cout << s.at(j); } for (int k = 0; k<i; ++k) { cout << s.at(k); } cout << "\""; i++; if (i<len) { cout << endl; Rotate(s, len); } }
Output
After client update, Software Center shortcut is pointing to old/wrong location. Fix by running this Powershell Script.
$linkPath = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft System Center\Configuration Manager\Software Center.lnk" $object = New-Object -COM WScript.Shell $shortcut = $object.CreateShortcut($linkPath) $shortcut.TargetPath = "C:\Windows\CCM\ClientUX\SCClient.exe" $shortcut.Save()
Create Website
From Cloud Shell, run this az vm extension set command to download and execute a PowerShell script that installs IIS and configures a basic home page.
az vm extension set \ --resource-group 79fdb1a1-c11e-4716-8a08-f9c4d710ed47 \ --vm-name myVM \ --name CustomScriptExtension \ --publisher Microsoft.Compute \ --settings '{"fileUris":["https://raw.githubusercontent.com/MicrosoftDocs/mslearn-welcome-to-azure/master/configure-iis.ps1"]}' \ --protected-settings '{"commandToExecute": "powershell -ExecutionPolicy Unrestricted -File configure-iis.ps1"}'
Set up Firewall
Run this az vm open-port command to open port 80 (HTTP) through the firewall.
az vm open-port \ --name myVM \ --resource-group 79fdb1a1-c11e-4716-8a08-f9c4d710ed47 \ --port 80
Verify Site
az vm show \ --name myVM \ --resource-group 79fdb1a1-c11e-4716-8a08-f9c4d710ed47 \ --show-details \ --query [publicIps] \ --output tsv
Check the page in a browser…
Notes
Create VM
USERNAME=azureuser PASSWORD=$(openssl rand -base64 32) az vm create \ --name myVM \ --resource-group 79fdb1a1-c11e-4716-8a08-f9c4d710ed47 \ --image Win2016Datacenter \ --size Standard_DS2_v2 \ --location eastus \ --admin-username $USERNAME \ --admin-password $PASSWORD
Verify VM
az vm get-instance-view \ --name myVM \ --resource-group 79fdb1a1-c11e-4716-8a08-f9c4d710ed47 \ --output table
Output
Notes
Official Documentation by Microsoft
Microsoft Quickstart: Create a Windows virtual machine with the Azure CLI
The latest Java Client is available here:
https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
Silent Installation
JavaDownload.exe INSTALL_SILENT=1 STATIC=0 AUTO_UPDATE=0 WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H WEB_ANALYTICS=0 EULA=0 REBOOT=0
64 Bit
Version
8.0.2020.8
Size
73.6 MB
Registry
REG.exe ADD “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F64180202F0}” /v “Publisher” /t REG_SZ /d “YourDesktopManagementSoftware—example: SCCM” /f
Uninstall
msiexec /x{26A24AE4-039D-4CA4-87B4-2F64180202F0}
32 Bit
Version
8.0.2020.8
Size
65.7 MB
Registry
REG.exe ADD “HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F32180202F0}” /v “Publisher” /t REG_SZ /d “YourDesktopManagementSoftware—example: SCCM” /f
Uninstall
msiexec /x{26A24AE4-039D-4CA4-87B4-2F32180202F0}
Download
New iTunes app is available from here:
https://www.apple.com/itunes/download/win64
Contents of iTunes64Setup.exe (using 7zip)
Size
256 MB
Command
iTunes64.msi /qn /norestart IAcceptLicense=Yes ALLUSERS=1 DESKTOP_SHORTCUTS=1 INSTALL_ASUW=0 NO_ASUW=1 SCHEDULE_ASUW=0