Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

indexing two arrays in Powershell

Hi All, I try to index two arrays by matching values; I have Inventory of computer names with AD last logon date, I want to update lastlogon date column with new arrays lastlogon date column I tried...

View Article


Powershell Users in a Group list and then export users recursive

Hi, I am wanting to find out how to put the two together. I have the following script for finding users/groups that have access to certain folders. $project_folder = "\\UNC PATH" get-acl...

View Article


PowerShell Script to Find AD Users with Extension Attribute 6 set

Could someone assist me in creating a PowerShell Script to search AD for Users that have Attribute 6 Set or modified from the Default <not set> status and export this list to Text file or...

View Article

Add-ADGroupMember : A referral was returned from the server???

I'm sure I'm missing something here...All I want to do is add a user from a child domain to a universal distribution group in a parent domain.  Sounds simple enough right?  WRONG!Here is the example...

View Article

Active Directory Account Expiration Notification to Managers

Active Directory Account Expiration Notification to ManagersHello script gurus - I wanted to send an automatic email notification to managers pertaining to their contractors that has an end date on...

View Article


How to export AD user and AD groups into Excel in matrix format

Hi Could anyone please tell me how to export AD users and AD group into Excel file. Something like  usernames in rows and Groups in the column. I am looking for a excel which shows everything in one...

View Article

Get remote logged on user with powershell

HiI'm looking to get the name of the currently logged on user of a remote pc.    Im not going to use anything that changes the environment such as setting up invoke-command, psremoting etc. There is a...

View Article

Need to run with different user

Hello,I want to run powershell script with different user account. And i need to store/save those account details as i need to run every time with that account.Can you please suggest.Thank You,Avis

View Article


SharePoint 2010 get list of site owners

Need a powershell script that will loop through all sites and subsites in a site collection that will get all owners with Full Control permissions.The reports should provide the followingThe URL of the...

View Article


Image may be NSFW.
Clik here to view.

Installing webserver on Windows 10 Build 1803 - Powershell Script

Hi,I am building a developers windows 10 machine who use .NET, Visual C++ and other softwares. They need to have IIS installed on Windows 10 machine. We have a ps script that runs to install these...

View Article

Reusing a function

I want to reuse a function, first to browse out to a source folder and then again to browse out to the target folder.  Guess I just don't understand and could use some help.  Here is the...

View Article

specific AD rights delegation

I'm looking for the commands to control AD delegation via a powershell script which I can find a few examples on how to set full rights to an OU as an example but nothing on how to set specific...

View Article

Remove Terminated Users Mobile Devices from O365

Hey all,So i am new to using power shell and trying to make part of our termination process less manual. Right now I have a powershell script that sets a users out of office from information pulled...

View Article


PowerShell script to get - disk uniqueID and drive letter

HiI am new to PowerShell and just started to learn it. Your help is much appreciated on this.In our environment, we frequently expand the server's disks. For that we need to get disk's unique ID and...

View Article

Azure AZ modules not working while nested in functions

Hello,I have written some complex PowerShell scripts for reuse.  I am cleaning them up and compartmentalizing into functions for readability, etc.I am having trouble with AZ functions not working...

View Article


repadmin and regex for powershell

Hi,I need some help to find good regex to create custom powershell object from repadmin.I use repadmin /showrepl and repadmin /replsumI share here sample of both repadmin command in french and in xlsx...

View Article

Write Output of a function in powershell window

I have a GUI and it calls a function depending on the button pressed. I would like for the output of the function to show in the powershell command window when I run the GUI. The code below contains 5...

View Article


what exactly is the null part in this error?

I have 2 scriptsscript1 has the following:Function Query($Query) { $SqlConnection = New-Object System.Data.SqlClient.SqlConnection $SqlConnection.ConnectionString = "Server=$DB_Server;Initial...

View Article

SCCM Application to Change Command Line

Hello, I am writing a PowerShell script to change the Installation Program command line of certain applications in the ConfigManager. Hypothetically, I want to replace only a certain part of the...

View Article

Getting SQL version info from list of server names

I am wondering if there is a powershell script I can run against a .txt file with server names in it that will return the version of SQL on that list of servers. Any help is appreciated.Thanks.Chad Guiney

View Article
Browsing all 21975 articles
Browse latest View live


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