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

Color Management install by powershell script

if I want to change the color profile, many articles are introducing to use color management, click, add, browse ..etc is there way to use powershell script to achieve this automatically? Thank you!1)...

View Article


Export list of members who is authorized to send to a distribution list in...

Is there a way to view and export a list of who (users and groups) is authorized to send to a distribution list once you have restricted it?

View Article


Executing Remote .CMD or BAT jobs?

What privileges will be needed bu a user to execute remote server CMD and BAT jobs?Is there any granularity to limit what CMD and BAT jobs a user can execute on a remote server/computer?Thank you,PR

View Article

Formatting powershell results

Hello,<o:p></o:p>I'm using JumpCloud powershell module for exporting command results.I'm trying to format powershell result but unable to export all columns. >get-jccommandresult -byid...

View Article

PowerShell Scripting - From a beginner

Hi folks ! I am starting to get more into PowerShell scripting. I did a small script to grab system and computer information that I find useful. However, I'd like to have some outside thoughts on...

View Article


Missing statement body in foreach loop

Hi,I am receiving the error, Missing statement body in foreach loop.   Any suggestions on what I am doing wrong?  $Shares = get-WmiObject -class Win32_Share -computer Server51 -Filter "path like 'E:%'...

View Article

Bulk change UPN based on primary SMTP proxyaddress

Hello all,I need to change all UPNs in specific OU based on primary email address. I know how to change one but how to do it in bulk?That what I want to do is to filter out all users that have new UPN...

View Article

How to answer "No" to confirmation prompt on deletion of a folder?

I try to write a PS script, which will browse through the folder3 and delete child files and folders, if their CreationTime and LastWriteTime are older, than 1 month:ls -r -force...

View Article


Try - Catch error handling

Hi guys! I'm writing a script in which I want to check if the server that the user filled in earlier, has an SQL Instance installed on it. For this I wanted to use a simple Try and Catch block but I...

View Article


Remove all computers from the Groups which they are associated

Hi All I have been trying to get a script to work which does the following: 1. Importing the CSV file which is provided to me  2. Trying to filter whether the list contains except users(it should not...

View Article

else : The term 'else' is not recognized as the name of a cmdlet, function,...

 Write-Host ""    Write-Host "Extracting $artifact_file_name ..."    (& $7z x $artifact_file_name) 2>&1 | out-null    $success=Execution_Status $?    if($sso -eq "true")    {...

View Article

How to create user profile using powershell?

Hi Team,Currently i am using PsExec64.exe utility create user profile below is command for reference, just wanted to check can we achieve the same out put using powershell command,if yes then would...

View Article

Can't install module from private devops feed.

Hi,I have problem with installing custom module from azure devops feed. I get an error Unable to find repository 'Test2'. Use Get-PSRepository to see all available repositories.PS...

View Article


Copying files from one folder that don't exist in another folder

Hi!I am trying to write a powershell script that copies all files from Folder A to Folder B that do not already exist in folder C.Is there a way to do this?Thanks!Zoe

View Article

Pass by reference or by value

I ran into an interesting piece of code that I wanted to clarify.  I am using a few custom objects in my code, and it seems that when you use the following code at the top of your script$theObject =...

View Article


need help to text a script for Remove-ADGroupMember

hi all,i need to write a script that when executed remove the user that execute it from all the ad group it is member, or from a specified groupplease can u help me text itthankscheers

View Article

JEA and GMSA

I have a service management application that can run powershell scripts.  Our plan is to use this application to run powershell scripts that will create and modify user accounts.  Our application...

View Article


Image may be NSFW.
Clik here to view.

Timestamping an out-file

I know if got this answered before but I had to change the last line of code because the files needed to go to a different location but now when I run the script i get an error. $yourfiles =...

View Article

Converting App Startup .CMD Script to PowerShell - Issues With Variables

My sincere apologies in advance for the length of this, but I sure could use your help if you have a moment.  I’ve been in IT support & management for a couple decades and have a fair amount of...

View Article

Set-ADExpiration

Hi,Im testing my script on how to bulk disable AD users with DateTime properties using the simplest command:Set-ADAccountExpiration -Identity TestAccount -DateTime"05/01/2019 05:31 PM"Now as I validate...

View Article
Browsing all 21975 articles
Browse latest View live


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