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

Installing VM agent using CLI command

I want to install VM agent during VM Creation. I was able to install the agent using New-AzureVM and New-AzureQuickVM Powershell commands. But i want the CLI equivalent of these commands. Please suggest

View Article


GP logon script with PowerShell

We have a Windows Server 2012 domain and would like to create a GP logon script with PowerShell.So if you execute the .ps1 file, the specified logon script settings (including parameters) would be...

View Article


Replace AD Usern Import CSV

Hey experts,I get a replacefor some users but in some, this works.Error: Set-ADUser : replace In C:\Users\Administrator\Desktop\Powershell\Import_bearbeiten.ps1:3 Zeichen:1+ Set-ADUser -Identity...

View Article

PowerShell look up table

HiI am looking to automate some SCOM daily alert reports and the basic powershell is straight forward.  get-scomalert -criteria "ResolutionState <> 255" | Select Name, MonitoringObjectPath ,...

View Article

Moving Outlook emails WITHOUT Exchange Web Services

I'm writing a powershell script and part of this script would involve moving emails from the Inbox folder to another folder. So far all I can find on google involves EWS but it is not available at...

View Article


New-variable to create strongly typed variable

In PowerShell to create a strongly typed I used to create strongly typed variable by typing Data Type in [] like [int]$aIs there any way you can create a strongly typed variable using variable...

View Article

Need help to find GPOs with a specific word

Hi Experts,<o:p></o:p>In my environment, we have 500+ GPOs and I have been asked to find the GPOs with a specific word like "dns". I believe powershell is the better way to find my...

View Article

Installed software in Server insert to Database tables

Software table has a foreign key (compID) from the Computer table primary key (compID)Computer table columnscompId    name   date .....Software table columnssoftID  compID  softwarename  vendor version...

View Article


Where to put -SizeLimit 0 and Export-CSV in this Quest Powershell script?

Hi allI found the following script which finds all groups in a domain and nested ones, the problem is that I don't know where to put -SizeLimit 0 and Export-CSV, because I have more than a 1000 groups...

View Article


Copying Multiple Folders (various servers) to a single location with a CRC or...

Hi Gurus!Any suggestions or insight on how I can do the following.  I need to copy multiple folder locations (and subfolders) from multiple servers to one server with a shared volume that will contain...

View Article

Changing flag status of emails

I created a script to change the flag status of all emails in my inbox folder.#set outlook to open $outlook = New-Object -comobject outlook.application $name = $outlook.GetNamespace("MAPI") #This...

View Article

How to select files in a folder with yesterday's date as part of the filename?

Hi there,I need to setup a scheduled task to daily back up some log files that have yesterday's date as part of the file names.  How can I make use of PowerShell scripts for wildcard selection on the...

View Article

Adding Power Users to D: drive

How can I grant Power Users Modify rights to the root of my D: drive using PowerShell?

View Article


Parallel processing using Scriptblock not working from windows task scheduler

Hi,I am using scriptblock to run parallel commands. My code is working correctly when I am running directly from PowerGUI IDE, but when I schedule it inwindows task scheduler or Visualcron, it's only...

View Article

Querying printers with status: Offline or Error - Offline

I m trying to query printers with status: Offline or Error - Offline.Currently I'm trying this, but it will also return printers with status: Paper jam or Toner low etc.get-WmiObject -class...

View Article


Windows 8 Account Picture

Hi, I would like to set the user account picture via PowerShell for a domain user.I've already tried to copy the accountpicture-ms to...

View Article

how to edit a computer account without set-adcomputer

I have this code that works.  It moves the Computer account to the OU I want.    $computers = (get-ItemProperty hklm:\SOFTWARE\Microsoft\MPSD\OSD).OSDComputerName $GetOU = (get-ItemProperty...

View Article


Manage MSMQ is missing from Failover Cluster Manager when configured using...

Hi,I am hoping someone would be able to help me as I have looked on the internet for an answer to this. We deploy a number of servers that are configured using Powershell. I am in the process of...

View Article

display file name and remove error from log output

  This script is working great from the GUI but when I call it from a cmd file from a job scheduler it throws out errors. I also want to display from is location the file name and it's byte...

View Article

Error handling, background jobs

Hello, having a script which will query FEP installation and Signature version on remote computers If the computers are online and everything works, there is no problém. How to deal with exceptions...

View Article
Browsing all 21975 articles
Browse latest View live


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