Quantcast
Channel: PowerShell

Can I Avoid UAC Prompt To Trust Printer Driver With PowerShell?

I'm trying to use PowerShell to install network printers on my small fleet of 15 or so Windows machines. I'm using PowerShell because I'm using Action1 as a RMM tool and I'm not using GPO because this...

View Article


How to grab data inside a Dataset in PowerShell?

Here's my PowerShells script.Powershell#variable initialization$currentTime=Get-Date-Format'g'# Define the list of SQL Server instances$sqlDatabases=@('DB14')# Calculate the date of the previous...

View Article


Removing Certain Groups from list of Devices

Hi,I am trying to remove a list of devies from any groups names like "ABC_*" or "123_*" but i am getting stuck somewhere I am not able to filter the memberof for just the groups i want. here is what i...

View Article

Powershell Scripting

what is an easy way to whitelist an email in powershell without writing the script every time? please help

View Article

Powershell to export discovert apps withing device name range

Hi all,I'm not sure if it's even possible (I haven't been able to find a way).The situation is as follow, we are incorporated in the tenant of our parent company and I'm looking for a way to export...

View Article


File sort files containing x , y, z

Hi Guys,I am trying to sort a huge amount of files with prefixes, suffixes and detail inbetween. I am at a the point where I can get part of the way, but my (little amount of) skill has run out and my...

View Article

Importing from CSV to SQL, how long?

Hey,So I've got this Powershell script which imports ~5.5m lines across ~150 csv's into SQL. The script works fine but it takes approximately 5 hours to complete which seems crazy long to me. Wondering...

View Article

Export all Intune devices that Group Membership is blank

I'm looking for a PowerShell script to export all Intune managed devices that are NOT assigned to a Group membership: Group membership = null or blankMany scripts out there that finds what devices are...

View Article


How do I format a time to 12-hour clock?

This is my PowerShell script.Powershell#variable initialization$currentTime=Get-Date-Format'g'# Define the list of SQL Server instances$sqlDatabases=@('DB1')functionQueryFailedJobs($servers){#...

View Article


Image may be NSFW.
Clik here to view.

Remote PS Command with Output

Good afternoon all.Let me start off by saying I appreciate all the assistance whenever I ask a question, and I promise I am trying to brush up on my PS, but it's a lot slower than I thought it would...

View Article

New-PSRoleCapabilityFile -ModulestoImport HashTableAttributes

I am trying to come up with a way of automatically producing the necessary role capability files to allow my site admins to be able to perform basic Lease/Reservation administrative tasks on the DHCP...

View Article

I need powershell scripts for windows 11

HelloCan anyone let me know a PowerShell script to one move the start bar to the right like windows 10Remove pinned apps as this is just bloat software Remove widgets as they do not provide any benefit...

View Article

Get-WmiObject diffrent result remote vs locally

Hi all,I'm trying to get a list of installed software on the systems in our network and found the following...

View Article


How to call external program from powershell script WITHOUT waiting?

Assume I have a powershell script foobar.ps1.I want to call another, external cmdline program (not powershell script) from inside this script (and pass some arguments).example:“D:\tools\exiftool.exe”...

View Article

Issue pulling one user's first initial

PowershellIhave2testusersIamusingthisonanditseemstoonlypullthe$Initialofthefirstuserinthegroup.Buttherestseemstoexecutejustfine.SothefirstuserisJohnDutton,thesecondisLukeTest.Isuccessfullygetjdutton@do...

View Article


How to call a .ps1 script with blanks inside filename? Enclosing double quotes

Assume I want to call (from wrapping DOS BATCH SCRIPT) a powershell script.Therefore i wrote inside the .bat script:TextPowershell.exe -noprofile -noexit -command "& {D:\tmp\testargs.ps1 %args%}"...

View Article

Script Worked for Years, Now It Doesn't. What Happened?

I hate having to figure out which IIS logfiles belong to which website. I normally don't have the time to look for the site ID to figure out which W3SVC12345678 folder is the right one. To get around...

View Article


Iterate over Arrays in a HashTable ?!

Hi,I have an 2 arrays added to a hashtable, and I want to loop through each item individually but can't seem to.I could not find how to access an individual array item in the hashtable. In this case...

View Article

Combining LDAP Queries is not working

Good afternoon folks.I am trying to run an LDAP query against a Domain Controller to include servers with the following requirements:OperatingSystem=*server* (To include all...

View Article

Better online Powershell scripting learning tools than free ones on YouTube?

I've done around 5 online free "courses" now and they all cover the bare bones, basic same points of Powershell that I'm not finding helpful. I've even paid for two and it all covers the same...

View Article


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>