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

Powershell for making old-school adventure games

I'm relatively new to scripting and programming and for my Sysadmin work I would like to learn powershell.When I was a kid I made little text adventure games with BASIC and it really helped me learn...

View Article


Suggestions on modify notes field in AD with Powershell

I have an AD import script and a function that compares an AD object with the corresponding account details in a CSV File. I  save all the notes("name changed from that to this", etc) that need to be...

View Article


Powershell 3.0: Printing part of the script only runs in Task Scheduler when...

The script runs normally when run outside of Task Scheduler.

View Article

Get Partner agents with full access and limited access users in office365...

Hi,how to retrieve the "Partner agents with full access" and "Partner agents with limited access" users in office365 using powershell?ThanksVenkat

View Article

Export data from XML

I have script$xml= (get-contentF:\nalog\DELTA_PLACANJE20130725.xml)$xml=[xml](get-contentF:\nalog\DELTA_PLACANJE20130725.xml)$1 = $xml.SelectNodes("/pmtorderrq/pmtorder/payeecompanyinfo/name") $2 =...

View Article


Need help to use powershell script with two foreach in c#

Hi All,I want to use the below powershell script in c#. The script is with two foreach loop and the 2nd foreach loop uses add-member to add the value that is  part of $mailbox variable. I managed to...

View Article

Copy-Item in an Array while keeping folder structure

Write-Host "Data Count" -foregroundcolor Green Write-Host "=========================" -foregroundcolor Green $drive = "C" Write-Host "Gathering Data Count" -foregroundcolor magenta # Lists in an array...

View Article

Documenting My Scripts... Any idea / Ready Documents to follow?

Hello, I want to document all my scripts for future reference and to describe what each script does, from where it pick the file paths, what result it gets and where it dumps the result.. Thinking of...

View Article


Image may be NSFW.
Clik here to view.

Powershell script to obtain Application name

Can Some one please help me to obtain the application name from the site usingPowershell script in IIS.It should get in the the loop of each root site present to check for the Application inside it....

View Article


How to use powershell hash table in c#.

Hi All,I want to use the below powershell command in c# and get the desired output.Powershell script:foreach($a in get-mailbox){get-activesyncdevicestatistics -mailbox $a.identity | Select...

View Article

strange errors

Hello friends,I'm writing a simple script:$usr = Get-Mailbox -Database MyDB | ? {$_.ArchiveDatabase -like "MyDBName-*"} foreach ($u in $usr) { $whencreated = (Get-MailboxFolderStatistics...

View Article

help with Get-ADComputer and Get-ADUser to get counts

hi all,i have 2 simple little scripts that give me the total count of computers and the other on the total count of user in any OU i specify.  well, i need to now figure out how to get a total count of...

View Article

convert csv file

Hi guys, I am trying to develop a script with powershell, i want to convert a csv file, you can download the file here : http://speedy.sh/ASZHh/AGE-OU-20130626.csv The csv file is headerless, i have to...

View Article


How to modify the date format

Right now, I have some code that is exporting a date into a spreadsheet.  The date field is outputting something that looks like this:1/2/2013 14:23How can I get rid of the time? I want to display just...

View Article

Remotely enable PSRemoting

Hi guys,So, the scripting world is new to me but I’m trying to get a handle on it, and hope that you can help me.I’m working in a mixed environment; our domain contains XP clients and 2008R2 servers....

View Article


Need to turn off the Windows 7 Automatic Driver Installation and Automatic...

Hi - I just started learning Powershell a couple months ago.  Posted once on this forum when I was just getting started and people were very helpful with directing me to links for the basics.I am...

View Article

resize-partition PowerShell - using a variable for size

Hello.I'm trying to user the PowerShell command resize-partition as part of a RunBook task so I need to be able to specify the size as a variable. The -size element requires that you also add on the...

View Article


Accessing an MS Access Form Control from PowerShell

I have been trying to convert an old VBScript to PowerShell. I have successfully converted all but one innocent-looking sub. In the sub, I need to access a textbox on an Access form, but for the life...

View Article

Getting the last name in a path as a variable

Lets say i have a path like C:/Myfolder/myfolder2/myfolder3/stuffHow do i get the folder with the name "stuff" out as a variable? not the hole path, but just the name of the last folder.

View Article

List local user account

Hi, I need to search one user against all the servers in the domain and check Is the user is part of administrator group ?

View Article
Browsing all 21975 articles
Browse latest View live