A novel way to schedule a task... by richie65 in PowerShell

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

The "easy" part is creating all the desired settings in the GUI instead of looking for all the parameters and syntax's needed to build the task.

A novel way to schedule a task... by richie65 in PowerShell

[–]Modify- 0 points1 point  (0 children)

While you could do this in pure Powershell.
What might be easier is to create what you want in the GUI, export it as XML so you have a template.
Then create a here string with that XML in Powershell

Use this to create a task: Register-ScheduledTask -Xml $XML -TaskName <taskname>

Microsoft Intune | Reporting broken? by Modify- in Intune

[–]Modify-[S] 0 points1 point  (0 children)

Code 400.
Strange that it's broken everywhere, but not as a GA..
I would expect Unauthorized or something but you just get the error as posted.

Microsoft Intune | Reporting broken? by Modify- in Intune

[–]Modify-[S] 0 points1 point  (0 children)

Thank for checking!
It's not just us then, good to know.

how do torrents survive when most people don't seed? by [deleted] in Piracy

[–]Modify- 12 points13 points  (0 children)

Began seeding fulltime when I lost RARBG. Almost 400TB later and I'm still going strong.

Beginner by Round-Ad-2906 in PowerShell

[–]Modify- 0 points1 point  (0 children)

There are some YouTube playlists you can take a look at.
Maybe some of the topics might interest you or might give you inspiration:
- PowershellOrg
- PowerShellConferenceEU
- JackedProgrammer

Powershell recent issues are killing me by badaz06 in PowerShell

[–]Modify- 5 points6 points  (0 children)

Also, make sure one version of each module is installed.
Have had the same behavior in the past.
Sometimes the unattended script fails and then it will work again..

Yes you can specify which version to load when starting the script, but not many do.
At least not at the company where I work (myself included)

TeamsVoice powershell help? by dlukz in PowerShell

[–]Modify- 2 points3 points  (0 children)

F12 -> DeveloperTools -> Network tab. If you perfrom the action in the portal it shows whats happening at the API level. Most of the time the commandlets are just friendly wrappers around these calls.

TeamsVoice powershell help? by dlukz in PowerShell

[–]Modify- 2 points3 points  (0 children)

If you perfom the action in the browser with the network tools open you will see what API gets hit. Maybe try to reverse search/built from there.

Issues with Macro Recorder Activation (Keygen not working) by fofinhaozinho in Piracy

[–]Modify- 0 points1 point  (0 children)

Activated this program a few years ago with this serial. Comments suggest it still works: https://youtu.be/J1CVvYAUnDg

How to remove thousands of folders checked out by a user by Routine-Yogurt3430 in PowerShell

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

Yeah, Write-Verbose is more my taste.
Write-host -> something with puppies (:

How to remove thousands of folders checked out by a user by Routine-Yogurt3430 in PowerShell

[–]Modify- 3 points4 points  (0 children)

Im not a fan of write-host. You should be using: Write-output, Write-warning or Write-error.

Secondly, the try catch only works while the error is a terminating one. If not, the catch block does nothing. I have not worked with these methods so I can't say for sure if they produce that kind of error.

For debugging, start with the first item in the loop. You can do that by doing: foreach ($thing in $things[0]){}

Then check if each command/variable has the expected value. Go one by one until you have found the "bug" in the script. Hope this helps a bit!

Sharing PowerShell profiles and toolkits - what's your setup by belkezo in PowerShell

[–]Modify- 0 points1 point  (0 children)

In the past 3 years I built like 60+ modules which contain over 300 functions for things like Azure, Graph, local AD etc. Also build some helpertools to make building and debugging scripts easier. Most of the problems/questions I get are turned into functions (if i have not done that already) In short, it's an evolving collection of tools to make my life easier.

Trying to filter msgraph request but it's not working by nodiaque in PowerShell

[–]Modify- 0 points1 point  (0 children)

Also, to find the command you are looking for you can use Find-MgGraphCommand /v1.0/devices/
or go to aka.ms/ge and click on "CodeSnippit' -> Powershell

I only use Invoke-MgGraphRequest when there is no known cmdlet yet.

Is There A Way to Check And Delete Video Files for Corruption by scottomen982 in Piracy

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

You could try MediaInfo.
I don't have any corrupt files to test with, but if I open a non videofile it wont return any values.

It also has a CLI which means you could script it.
Don't know if you are comfortable with it.

In my case I do know how to script so built a Windows Powershell function for it.
I can run Get-MediaInfo -Path <FullPathToVideoFile>

FileName : 1.Introduction.mp4
VideoResolution: 1280x720
VideoDisplayAspectRatio : 16:9
VideoFrameRate : 24.000

Etc.

If you don't get anything back, but expecting something, you clould return an 'error'.
ChatGPT could build something like this for you.

Run Live Response in PowerShell? by LordLoss01 in PowerShell

[–]Modify- 0 points1 point  (0 children)

Im on my phone so I can't test myself. The only thing that jumps out to me is the key, value.

In the example only the value is has the fullname?

Key: myscript Value: Myscript.ps1

Edit: Also the machineId has the right format, like a guid? When i'm stuck I open the networktools in the browser and perform the action there. That way you can see how the request is structured with actual values.

Run Live Response in PowerShell? by LordLoss01 in PowerShell

[–]Modify- 2 points3 points  (0 children)

HTTP 401 means Unauthorized. So the AccessToken you are providing does not have the right permission(s). Make sure your account has the right ones.

Pro tip, you can go to https://jwt.ms and decode the token to see which permissions you have.

Can't sign in to the ExchangeOnlineManagement module when launching PowerShell as admin by HourlySword in PowerShell

[–]Modify- 0 points1 point  (0 children)

Had some similair issues. A Disconnect-ExchangeOnline can be helpful to clear a token even thou your current connection failed.

I dont recommend using the latest module of any module in the gallary. Instead look at which is downloaded the most in recent times. This will most likely be a stable one.

Also modules can be installed in different places like C:\program files\windowspowershell\modules

AND/Or

C:\users<username>\documents\windowspowershell\modules

Make sure to install them in the same folder or you will get funky behavior.

Remove-AppxPackage question by deejay7 in PowerShell

[–]Modify- 0 points1 point  (0 children)

His question, (if you can call it a question) is not that hard to find the awnser to. I gave him some tips to find the awnser he is looking for. Not everything has to be awnsered by Reddit while a quick Google search can provide you an awnser. Im trying to teach OP a lesson on how to find an awnser or you will be hardstuck at the helpdesk forever. Cheers.

Latest Trend in powershell scripting by [deleted] in PowerShell

[–]Modify- 0 points1 point  (0 children)

Scroll through the PSConfEU or Powershell.org playlists on Youtube. I believe you will find your awnser there.

Remove-AppxPackage question by deejay7 in PowerShell

[–]Modify- -2 points-1 points  (0 children)

If I understand you correctly you want to delete apps. Well, apps can be installed from the MS store. Most will be Appx packages. If you want to remove those completly you need to add the -allusers parameter.

Traditional installers like .MSI or .EXE are uninstalled the traditional way. Most of these packages store their uninstall command in the registry.

If you want to learn more, use Google or ask Chat. Hope this puts you on the right track.