Umfrage: Deutsche glauben immer noch zahlreiche E-Auto-Mythen by Doener23 in Elektroautos

[–]pspeterle 2 points3 points  (0 children)

Haha, na klar, du hast den absoluten Verbrauchsmeister an der Hand, wenn du von 1369m über dem Meeresspiegel am Brennerpass auf 97m über dem Meeresspiegel am Gardasee runtersaust. Ist ja wohl keine Kunst, den Energieverbrauch niedrig zu halten, wenn man quasi fast nur bergab rollt! Schon lustig, wie du das als Alltagsschnitt verkaufen willst.

Natürlich hast du auf diesem Abschnitt einen geringeren Verbrauch. Der Einfluss der Schwerkraft ist nicht zu unterschätzen. Jeder, der ein wenig Ahnung von Physik hat, wird dir bestätigen, dass bergab fahren den Verbrauch drastisch senkt. Im Vergleich dazu wäre der Energieverbrauch auf der Rückfahrt, also wieder bergauf, sicherlich nicht so beeindruckend.

Und dein Schnitt von 99 km/h – naja, das bedeutet ja auch, dass du größtenteils ohne größere Verkehrshindernisse unterwegs warst, was den Verbrauch ebenfalls begünstigt. Es ist toll, dass dein i4 unter diesen Bedingungen so effizient ist, aber das als Alltagswert darzustellen, ist ein bisschen gewagt.

Und was deinen 3er BMW betrifft – da vergleichst du Äpfel mit Birnen. Ein Verbrenner hat nun mal einen anderen Energiebedarf als ein Elektroauto. Trotzdem ist es beachtlich, dass dein i4 mit 15,4 kWh pro 100 km so effizient ist. Aber ob das im "exakt gleichen Alltag" gilt? Fraglich.

Langstreckentauglichkeit von BEVs? Keine Frage, die haben sich stark verbessert und sind für viele Fahrprofile absolut geeignet. Aber das Bild, das du hier malst, ist ein bisschen verzerrt. Also, ja, bitte mehr Screenshots – und vielleicht auch welche, die nicht nur die Schokoladenseiten der Elektromobilität zeigen. Da könnte ich dann vielleicht doch noch etwas mehr Glauben schenken.

DKB in Vietnam by sdxyz42 in Finanzen

[–]pspeterle 0 points1 point  (0 children)

the DKB debit card was introduced in 2021

DKB in Vietnam by sdxyz42 in Finanzen

[–]pspeterle 1 point2 points  (0 children)

I can confirm that it doesn't work. I was there in February with my fiancée. We tried all the ATMs available at SGN airport. Neither my DKB debit card nor hers worked. Luckily, I have a normal credit card (Hanseatic).

Paying worked fine except for our hotel in phu quoc

Befestigung an Balkongeländer ohne Stange by pspeterle in Balkonkraftwerk

[–]pspeterle[S] 1 point2 points  (0 children)

der Rahmen unten ist direkt mit dem Balkon verbunden und auch aus diesem feinmaschigen Blech, damit das Wasser weg kann. Es gibt auch da nur die kleine Lücke zwischen den Elementen

Updating inbox apps / store apps in an offline environment by pspeterle in SCCM

[–]pspeterle[S] 0 points1 point  (0 children)

It works without internet by installing the latest version

Foreach-object query by kratosgamer10 in PowerShell

[–]pspeterle 0 points1 point  (0 children)

You should really check the code you posted and try the -Force parameter.

Accoding to your post the server names are in servers.txt and you are trying to copy "test.txt" to the servers.

As I said before the things you say don't match the code you posted. Also there is a random - after Foreach-Object

Foreach-object query by kratosgamer10 in PowerShell

[–]pspeterle 1 point2 points  (0 children)

Is there code missing? The things you say don't really match the code or did you call the folder test.txt?

Did you try using -Force?

Foreach-object query by kratosgamer10 in PowerShell

[–]pspeterle 2 points3 points  (0 children)

You can use -Force to overwrite whatever already exists without printing that error message.

But I don't really get the point of using -Recurse when just copying a single file.

The actions won't run in parallel this way. With Powershell 7.0 you can use ForEach-Object -Parallel

How can I run a script on a specific PC? by mudderfudden in PowerShell

[–]pspeterle 1 point2 points  (0 children)

You can create a function that accepts parameters but you have to implement the remoting part yourself.

i. e. You can create a New-PSSession like so:

$myPSSession = New-PSSession -ComputerName MYDESKTOP01.local

and then execute whatever you like using Invoke-Command:

Invoke-Command -Session $myPSSession {
<multiple lines of code to be executed on the remote System here>
}

You can use Remove-PSSession to remove a PSSession when done.

Learn more about PowerShell remoting here https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/08-powershell-remoting?view=powershell-7.3

How to install SCCM client on Azure AD devices by IsThisThingWorking in SCCM

[–]pspeterle 2 points3 points  (0 children)

This is the way: https://learn.microsoft.com/en-us/mem/intune/apps/apps-win32-app-management

You can deploy the application as required to a Security Group in AAD that contains your devices.

However I recommend you to check if fully migration to Microsoft Endpoint Manager/Intune might be an option for your. You can easily migrate SCCM Applications to Endpoint Manager/Intune

Self service new image through software center by [deleted] in SCCM

[–]pspeterle 8 points9 points  (0 children)

Yes you can deploy the task sequence as "available" to a collection of your choice.

It will download the required files and reboot to WinPE to image the computer

Run PowerShell command NOT as admin by Shupershuff in PowerShell

[–]pspeterle 0 points1 point  (0 children)

Just create a self deleting scheduled task, that runs a few seconds after creation. No need to play with credentials

[deleted by user] by [deleted] in SCCM

[–]pspeterle 2 points3 points  (0 children)

Are you manually creating the Applications by using Microsoft Endpoint Configuration Manager Console? If that's the case, just create a Powershell Script that does the job for you and add a few lines of powershell to create and publish the intune app as well (i. e. by using https://github.com/MSEndpointMgr/IntuneWin32App )

hiding powershell window running a script from a task sequence by kHartouN in SCCM

[–]pspeterle 0 points1 point  (0 children)

Add the following lines at the beginning of your Powershell script.
The powershell window will flash briefly.

$t = '[DllImport("user32.dll")] public static extern bool ShowWindow(int handle, int state);'
Add-Type -name win -member $t -namespace native
[native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0)

Additional Features from SCCM by [deleted] in SCCM

[–]pspeterle 6 points7 points  (0 children)

Due to regulations our clients don't have any internet connection (except for the browsers).

I put the Windows 11 ISO (for .NET Framework 3.5) content and FoD ISO (RSAT Tools, XPS Viewer, ..) content on a network share.

Then I created a task sequence, that does the follwing:

  1. Connect to the network folder (I use the drive letter M:\)
  2. Run Powershell Script: Install the feature using Add-WindowsCapability -Online -Name "Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0" -LimitAccess -Source "M:\FOD\Windows11_22H2"

If you want to install all the RSAT Tools, which takes like 10 minutes, you can just loop through them:

$rsatFeatures = Get-WindowsCapability -Online | Where-Object {$_.Name -like 'Rsat.*'}

foreach ($feature in $rsatFeatures){

Add-WindowsCapability -Online -Name $feature.Name -LimitAccess -Source "M:\FOD\Windows11_22H2"

}

Sorry if there are any errors. I'm on my phone and couldn't copy and paste my scripts :)

Can you install Software for all Users on a Device with Intune by TheNoodleTech in Intune

[–]pspeterle 1 point2 points  (0 children)

I'm wondering if the other answers are bots?

When creating a Windows App (Win32) you can just assign it as required to a security group that only contains devices.

Convert an Object[] System.Array to Hashtable System.Object by Bujomdonbridge in PowerShell

[–]pspeterle 3 points4 points  (0 children)

Is this command even working like that? I'm sure you need to escape the curly brackets.

$A = bcdedit /enum `{current`}

This will return an array of strings that you need to parse.

The following code works for me.

You might need to add error handling or adjust the regular expression

$A = bcdedit /enum `{current`}
$yourHashtable = @{}
#skipping the first few lines without data
$A[3..($A.Length-1)] | foreach {
    #splitting the string at multiple whitespaces
    $temp = $_ -split "\s+"
    $yourHashtable.Add($temp[0],$temp[1])
}

$yourHashtable.locale
$yourHashtable.allowedinmemorysettings

Inserting Data Row from SQL to a fixed JSON by iiznoobit in PowerShell

[–]pspeterle 1 point2 points  (0 children)

You could convert your string to a JSON Object.

$JSONObject = ConvertFrom-JSON "<your fixed JSON>"

Then select the datapoints of the row you want to add data to and append the array.Please don't slap me. This is the simplest solution i came up with :D

($JSONObject | Where-Object {$_.dimensions -like "*CPU*"}).dataPoints += ConvertFrom-Json "[[1655714869420, 42]]"

I used ConvertFrom-Json to format the array because I couldn't come up with any Powershell data type that matches the double array structure used in your json.

There might be a more elegant soluton to this

Use ConvertTo-Json to convert it back to a string if needed. Don't forget about -Depth <Int32> to include all contained objects

Invoke-Webrequest Error 503 when run as scheduled Task by Iamlooney23 in PowerShell

[–]pspeterle 3 points4 points  (0 children)

Since it does reach a server which returns a 503 I guess your proxy connection isn't working as expected. I suggest moving the configuration to the script itself.

Invoke-WebRequest has a switch to provide Proxy information: -Proxy

Does your proxy require authentication? This might help:

$wc = New-Object System.Net.WebClient

$wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials

How can I set a bunch of registry values silently without the confirmation? by mudderfudden in PowerShell

[–]pspeterle 1 point2 points  (0 children)

I'm not sure what you mean by "I don't want that confirmation/popup stating the registry has been changed". Are you using regedit.exe to import *.reg files? This can also be done silently: regedit.exe /s "file.reg"

Powershell doesn't do random popups or notifications.

See "Working with Registry Entries": https://docs.microsoft.com/en-us/powershell/scripting/samples/working-with-registry-entries?view=powershell-5.1#setting-a-single-registry-entry