Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Browsing all 6937 articles
Browse latest View live

Using Invoke-RestMethod and ignoring self-signed or expired certs

 I have written a script where I am making adjustment to my InfoBlox system through the rest API and when I tried running the script from a non elevated  prompt, I got errors like these below: The...

View Article


Help with recursing through a library and it's sub-folders

Hello everyone.  I have a script that'll extract files & metadata (metadata into CSV) to a drive.  This script was designed for organizations when they have "audits" and things of that nature that...

View Article


Using Read-Host to set WSUS auoption schedule - Help pls

Hi I am still learning powershell and was wondering if you guys can share a clever way of scheduling WSUS auoptions to modify the reg key, prompting an Admin user with Read-Host to set registry AU...

View Article

'-Wait' Attribute on Admin Task

Hi All,Having some issues with an admin task that is designed to run via command line in powershell.The task requires escalated privilege to run but when doing this the '-Wait' option does not work.The...

View Article

Why is my compare script finding group inheritance ?

Hello,When I run my script it is returning groups that do not have the user AD group membership in it directly.Example if the person is a member of the Local Admins Group it is returning that he is a...

View Article


a problem with try catch

i am creating a function which first checks the existence of these two GPOs in GPMC.msc and if they don't exist, it dowsn't generates error & instead it creates them.function MyCreatADOUs {...

View Article

Episode 296 – PowerScripting Podcast – Joe Levy from Microsoft on Azure...

Tonight on the PowerScripting Podcast, we talk to Joe Levy from Microsoft about Azure AutomationRead More

View Article

Iterating through multiple text files to install muliple printers on...

I am racking my brain trying to figure out the best logic to take a list of computers, a list of printers, and a list of associated printer names and parse these to enable me to install each printer,...

View Article


Trying to only list IIS application pools that are actually used by web...

I'm trying to list IIS application pool "names" that are actually tied to an IIS web application. Basically exclude app pool that has a null value in the 3rd column titled "Applications". So if i run...

View Article


read a large line? how can faster finish and split

gc $Tp2Composite_path="tp.txt"$tp2composite_content= gc $Tp2Composite_path | where-object{$_ -ne ''} $tag_content = gc $tag_report_path...

View Article

Filtering the list of tables to script

Hi,I have this script, that scripts all tables in a database into one file.  How can I change it so it scripts only tables, which match the masks of 'Table1%' or 'Table2%' into individual files named...

View Article

Array of Array Question

HelloCan someone help, how would I do the followingI have thousands of text files, with the following data in each of them object-group network clisys_lca6_nets network-object 192.168.112.64...

View Article

Loading VMware and SQL powershell

Hi,I installed VMware and SQL powershell, but it want to be used in their own Powershell environments and I do not see them with Get-Module command. Is there a way to load them with regular powershell...

View Article


Image may be NSFW.
Clik here to view.

My script takes over an hour to run !?

Hi all,I'm new to powershell and have finally finished my first script to get all the groups of 2 OU's and some extra groups that I need to report on and get all the users - and output into the format...

View Article

Running bcp from powershell

Hi,I have the below job step, which I need to convert into powershell, because the security policies do not allow xp_cmdshell to be used.How can I change the below TSQL into powershell?Thanks DECLARE...

View Article


Complete Common SQL Server Database Administration Tasks In Parallel with...

In my daily work as a SQL Server DBA, there are many times I want to do things in parallel, for example:Read More

View Article

SCCM – PowerShell to Check Windows Updates and Install Them on Computer

Here are two PowerShell scripts  that checks what updates have been delivered to a computer via SCCM and invokes the installation of them. Why do you ask? Well I build servers and need to make sure all...

View Article


How to purge items from a large history list safely via PowerShell

Occasionally a history list grows to a point where you can no longer utilize NWAdmin to trim the list.Read More 

View Article

SharePoint Online Client Object Model and PowerShell: Three tips

Over the years, SharePoint has evolved a lot and the powerful tool we know today has undergone some serious developments. SharePoint developers working on configuration of the platform for specific...

View Article

Manage Distributed Cache in SP2013 using PowerShell

i was surfing for a single stop point where we can have all the commands with screenshots stating how to use each command and if any error raised suddenly the solution should be followed.Read More 

View Article
Browsing all 6937 articles
Browse latest View live