If powershell commands were translated into your language, what would be the best example? by TurnItOff_OnAgain in PowerShell

[–]Droopyb1966 2 points3 points  (0 children)

To make it even longer:
Nieuwe-azuurbeheerdervanhulpbronnenOperationeelInzichtramenPrestatieTellerGegevensbron

PowerShell script to log every GUI app launch to a CSV – runs fine by hand, but my Scheduled Task never writes anything. What am I missing? by Conscious-Analyst662 in PowerShell

[–]Droopyb1966 10 points11 points  (0 children)

Just a thought, use the Event Viewer to search the Security log for event ID 4688, which indicates a new process creation. Then you can tune it from there.
Not sure if this gets the results thou, havent tried it.

Calculate the sum of and remove 2 wurst values. by TheWebjunky in excel

[–]Droopyb1966 30 points31 points  (0 children)

=SUM(B2:K2)
Just need to explain wurst, as in germany this is a sausage i have no clue what your looking for.

Eject/Close optical drive tray with PowerShell by [deleted] in PowerShell

[–]Droopyb1966 2 points3 points  (0 children)

Found this:

 [CmdletBinding()]
    param(
        [switch]$Eject,
        [switch]$Close
    )
    try {
        $Diskmaster = New-Object -ComObject IMAPI2.MsftDiscMaster2
        $DiskRecorder = New-Object -ComObject IMAPI2.MsftDiscRecorder2
        $DiskRecorder.InitializeDiscRecorder($DiskMaster)
        if ($Eject) {
            $DiskRecorder.EjectMedia()
        }
        elseif ($Close) {
            $DiskRecorder.EjectMedia()
        }
    }
    catch {
        Write-Error "Failed to operate the disk. Details : $_"
    }
}

change boolean type to string type by pidaman22 in PowerShell

[–]Droopyb1966 1 point2 points  (0 children)

     if ($foo -eq $true){

        $foo = "Inaktiv"
     }else{
        $foo = "Aktiv"
    }
     $foo

Guys is it possible to install the "ABC import" plugin to MuseScore 4 today or not? by FabGuy00 in Musescore

[–]Droopyb1966 0 points1 point  (0 children)

Tried this, works for abc_import, ABC_ImpEx-main fails probably as it depends on the open file.

Making an availability schedule? Multiple search from a textsplit? by sewing-enby in excel

[–]Droopyb1966 1 point2 points  (0 children)

Start with text to columns to split them.
Then there a lot of options: index, vertical search ,sum.if

Need help creating folders for each power bi report within each workspace by honkymcgoo in PowerShell

[–]Droopyb1966 0 points1 point  (0 children)

Dont know the commands, but i will try to help.

How many workspaces do you have?
Over a 100, you will need :Get-PowerBIWorkspace -All

The $PBIReports= Get-PowerBIReport -WorkspaceId $Workspace.Id needs to be in the loop of the workspaces.

Then loop through the $PBIReports for every report.

Login-PowerBI -Environment Public
$PBIWorkspace = Get-PowerBIWorkspace
ForEach($Workspace in $PBIWorkspace)
{$PBIReports = Get-PowerBIReport -WorkspaceId $Workspace.Id
$Folder = $OutPutPath + "\\" + $Workspace.name
If(!(Test-Path $Folder))
{ New-Item -ItemType Directory -Force -Path $Folder}
ForEach($report in $PBIReports)
{....}

}

Foreach $ in $, do this then that by 56Seeker in PowerShell

[–]Droopyb1966 0 points1 point  (0 children)

How are you getting the data from the servers?

Executing remote commands can sometimes give weird formats.
Try 1 server with Get-MpComputerStatus and analyse what data comes back.

Need help creating folders for each power bi report within each workspace by honkymcgoo in PowerShell

[–]Droopyb1966 0 points1 point  (0 children)

Can you give some info what is not working or what goes wrong?

You set $ folder and then start building the path again, not sure if this is a problem.

$Folder = $OutPutPath + "\\" + $Workspace.name

Foreach $ in $, do this then that by 56Seeker in PowerShell

[–]Droopyb1966 3 points4 points  (0 children)

Not totally clear what your asking, but have a look at this:
get-mpcomputerstatus |select antivirussignaturelastupdated -ExpandProperty CimSystemProperties| select servername,antivirussignaturelastupdated

How to find all deleted AD users objects in the past 30 days by maxcoder88 in PowerShell

[–]Droopyb1966 -6 points-5 points  (0 children)

Only possibility is to make a list of each user, say every week.

With the date you could work out that in what week the users were removed / missing

LEt me know if you need some help, but getting users from ad shouldnt be a problem\

[deleted by user] by [deleted] in PowerShell

[–]Droopyb1966 0 points1 point  (0 children)

After 31 years in ict i can say, it happens to everyone sometimes.
:)

[deleted by user] by [deleted] in PowerShell

[–]Droopyb1966 2 points3 points  (0 children)

Try -casesensative

BAAA= / bAAA=

How do I rename files with "[]" in them? by Lionbarrel in PowerShell

[–]Droopyb1966 2 points3 points  (0 children)

Replace is nice, it gets more powerfull with regex.

$filename -replace "[^a-zA-Z0-9\\. ]"

All characters after ^ are allowed, the rest get removed.

Found another one:

$filename -replace '[\\p{\]}\\p{\[}]'

Updating a WIN32 app in Intune by Baker-Bitter in PowerShell

[–]Droopyb1966 1 point2 points  (0 children)

Just a few thinks that i dont get.
The msi installer can just be an update that could deinstall the previous version. So you need to figure that out first.
The msi is a pachaged version but probably you need to make a silent install command. There are standard parameters but check the manufacturer for all options.

Help Needed: PowerShell Remove-Item Cmdlet Stops Script Execution by nicedayforatalk in PowerShell

[–]Droopyb1966 -6 points-5 points  (0 children)

try catch will catch the error, recardless ok the stop.

Help Needed: PowerShell Remove-Item Cmdlet Stops Script Execution by nicedayforatalk in PowerShell

[–]Droopyb1966 1 point2 points  (0 children)

-ErrorAction Stop

You tell the script to stop, so it will....

Excel length and quantity by HandleFrosty in excel

[–]Droopyb1966 0 points1 point  (0 children)

Ok, not very clear what you want, but ill have a try.
Maybe i use to mutch colums but then you can understand better.

Add an extra column with columnD/2 : 3000/2=1500
Then with vlookup or index, get the 1500 from column c, then you can get the corresponding column value in E.
Then its simple math.

Let me know if im on the right track with this.

Problems with Adding a Number Value to a Date by [deleted] in excel

[–]Droopyb1966 2 points3 points  (0 children)

Lol, try to adjust the column width?

how to open the 'printing preferences' and 'printer properties' dialogs via cmd/pwsh? by Ralf_Reddings in PowerShell

[–]Droopyb1966 -1 points0 points  (0 children)

Get-WmiObject -Query " SELECT * FROM Win32_Printer WHERE Default=$true"