Fail to create VM using PowerShell commands
I tried to create a new VM with Public IP. The only way I found was using PowerShell.
This was the commands I used.
$vm = New-AzureVMConfig -Name "mu0035" -InstanceSize Small -ImageName "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_1-LTS-amd64-server-20140924-en-us-30GB"| Add-AzureProvisioningConfig -Linux -LinuxUser $username -Password $password|Set-AzurePublicIP -PublicIPName "mu0035PIP"
It returns `BadRequest: The location or affinity group East Asia of the storage account where the source image b39f27a8b8c64d52b05eac6a62ebad85 resides is not in the same location as the specified cloud service ,"Southeast Asia"`.
It seems the image locate in East Asia, and I want to create VM in 'Southeast Asia'.
Interest thing is, I have already set the subscription's currentstorageaccount to a `Southeast Asia` storage account.
Get-AzureSubscription -Current
SubscriptionId : $subscription_id
SubscriptionName : BizSpark
Environment : AzureCloud
SupportedModes : AzureServiceManagement,AzureResourceManager
DefaultAccount : $account_name
Accounts : {$account_name}
IsDefault : True
IsCurrent : True
CurrentStorageAccountName : sourtheast
Get-AzureStorageAccount -StorageAccountName sourtheast
StorageAccountDescription :
AffinityGroup :
Location : Southeast Asia
GeoReplicationEnabled : True
GeoPrimaryLocation : Southeast Asia
GeoSecondaryLocation : East Asia
Label : sourtheast
StorageAccountStatus : Created
StatusOfPrimary : Available
StatusOfSecondary : Available
Endpoints : {https://sourtheast.blob.core.windows.net/, https://sourtheast.queue.core.windows.net/, https://sourtheast.table.core.windows.net/}
AccountType : Standard_GRS
StorageAccountName : sourtheast
OperationDescription : Get-AzureStorageAccount
OperationId : f1326e6e-951d-1c9c-bb4d-4a65900025bb
OperationStatus : Succeeded
I can't figure out what happened. Why the powershell command not fetching the image from a wrong location?
Please, Help!
Hi, it looks as though the "StorageAccountName" is set to "sourtheast", possibly just a typo when the accountname was created?
Similar Messages
-
How to get Systemstate Backup size using PowerShell command in Windows 2008 R2
Hi,
We using WBSummary command to get completed backup status.
I need to find how much data is backed up using powerShell command .
Is there any way to get the details , i can see the GUI but no in command.
Please advise
Regards Gopi KHi,
You mentioned that you can see the system state backup size in the GUI. Does the backup size mean the amount of date transferred?
It seems that there is no such a PowerShell to get Systemstate Backup size. You may need to you need a PowerShell scripts to do this work.
http://social.technet.microsoft.com/Forums/windowsserver/en-US/home?forum=ITCG
Regards,
Mandy
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Retrieve all pages in a site collection using powershell command
Hi all,
I need to retrieve all pages in a site collection and i wanted to display it in a csv file using powershell command.Please help.
Regards,
PraveenHi Praveen,
Here are two blogs would be helpful:
PowerShell script to Enumerate Sites, Sub-sites and print them in a .csv file
http://www.sharepointfix.com/2012/02/powershell-script-to-enumerate-sites.html
Powershell to Loop through all SharePoint sites and pages
https://tjendarta.wordpress.com/2013/03/19/powershell-to-loop-through-all-sharepoint-sites-and-pages/
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Failed to create package using pkgmk
Hello Experts!
Im not sure whether this is the right place to post this topic in this forum. Sorry, if not. I want to create a package in solaris. Ive created pkginfo file and here are the contents
PKG = Daemon
ARCH = SPARC
VERSION = 1.0
NAME = sample
CATEGORY = application
and then ive created the prototype file using pkgproto
command and the file contents are....
!search /export/home/pp/Daemon
i pkginfo=/export/home/pp/InfoFiles
d none Daemon 0755 root other
f none Daemon/Daemon.cpp 0644 root other
f none Daemon/makefile 0644 root other
f none Daemon/Daemon.o 0644 root other
f none Daemon/samp.exe 0755 root other
Now, when im trying to create a package using pkgmk its giving the following error:
# pkgmk
## Building pkgmap from package prototype file.
ERROR in prototype:
no object for <pkginfo> found in local path
pkgmk: ERROR: unable to build pkgmap from prototype file
## Packaging was not successful.
NOTE: My current directory
is /export/home/pp/InfoFiles
The directory InfoFiles contains pkginfo and prototype files
Where am i doing wrong??
Any help would be greatly appreciated...
Thanx in advance
LathaHI
I think the pkginfo command needs to point to the pkginfo file directly
eg
i pkginfo=/tmp/InfoFiles/pkginfo
see th examples section in
man -s4 prototype
also in the pkginfo you need have no spaces in the lines
eg
PKG=Daemon
not
PKG = Daemon
from man -s4 pkginfo
tim. -
How to create backup using sql commands
can i create a backup using sql/sqlplus commands
I would actually advice you to use RMAN, instead of backup using sql commands, but if you want or have a requirment to do so..
First off all you should ensire that your databasse is in archilog mode.. (ALL PRODUCTION DATABASES should be in archivelog mode)
you can do it using sql*plus
archive log list
Then if you would like to make a cold backup (the only one posible in noarchivelog mode)
ypu have to
shutdown immediate
copy all database files (you don't need to copy redo logs) to another device
startup - to startup database
Actually I will suggest that your read User manager Recovery guide from oracle documentation
tahiti.oracle.com
Best Regards
Krystian Zieja / mob -
Assign IP to newly created VM using powershell
Hi,
I have created a new VM in hyperv and added a fresh Windows server 2012 VHD.
Now I need to assign IP to the new VM using powershell.
Regards,
Suganya.Hi Suganya,
you are indeed right and I messed up there (We use VMware so I couldn't give it a try. In that case I tend to browse the library but was too superficial).
That said, I did a more thorough research to make up for it, and
this blog entry discusses that very problem and has a powershell solution to it. Can't test it though, so you may want to run the wmi queries step by step against your Hyper-V.
Cheers,
Fred
There's no place like 127.0.0.1 -
Creating dimensions using MaxL commands
Is there anyway to create one or more dimensions using MaxL commands?
Also setting their parameters like "Accounts/Time", "Label Only" and "Dense/Sparse"?Here's a sample from the documentation:
import database sample.basic dimensions
from data_file '/data/calcdat.txt'
using rules_file '/data/rulesfile.rul'
on error append to '/logs/dimbuild.log';
Check: import dimensions in the MaxL part of the technical reference you will find more examples. -
Why color code css using powershell command is not visible in email ?
Hello,
I am applying color code for disabled status in PS script as written below :
$ReportData = Get-SPServiceInstance | Select Server,TypeName,Status,NeedsUpgrade | ConvertTo-Html -Fragment
$DisabledStatus='<td>Disabled</td>'
$DisabledColorStyle='<td style="background-color:red !important;color:white !important" >Disabled</td>'
$ReportData = $ReportData -replace $DisabledStatus,$DisabledColorStyle
ConvertTo-Html -Body "<font color = blue><H4><B>Report </B></H4></font>$ReportData" -Title "Test Report" -CssUri C:\style.CSS | Out-File "E:\Reports\TestReport.html"
This report shows perfect on system where report file is located at E:\Reports\TestReport.html location as below :
However , when I send this report via email using following command
$Report = Get-Content "E:\Reports\TestReport.html"
Send-MailMessage -To $To -SmtpServer $SMTP -From $From -Subject $Subject -BodyAsHtml "$Report"
I dont see disabled as red color in email , while table's style is working which is stored at C:\style.CSS
Would you please let me know the reason behind same ?
Thanks and Regards,
Dipti
Dipti ChhatrapatiHi Dipti,
I‘m writing to check if the suggestions were helpful, if you have any questions, please feel free to let me know.
If you have any feedback on our support, please click here.
Best Regards,
Anna
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
Hi All,
As a complete novice to the powershell world I am looking for some direction in a script to manage my work project data lifecycle.
I have a share on our production server (\\PROD1\Projects) which contains folders starting 99ENGXXX that contains project work, when staff rename the folder to ARC99ENGXXX, I am trying to work out a powershell command to move the folder and its contents
to a share on a archive server (\\ARC01\Projects). Both are windows servers.
Any help would be greatly appreciated!
SammyTry this (Assumes you are running at least PowerShell V3):
Get-ChildItem "\\PROD1\Projects" -Recurse -Filter "ARC*" -Directory |
Move-Item -Destination "\\ARC01\Projects"
Boe Prox
Blog |
Twitter
PoshWSUS |
PoshPAIG | PoshChat |
PoshEventUI
PowerShell Deep Dives Book -
How to create db using sql commands?
Had logged in to default database with the default login nmae and password. Under this default database, am i able to create another database in it? If so, what is the sql command to create/delete the new db?
Chapter 2
http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96521.pdf
Joel P�rez -
Fail to change "AddressState" using powershell cmdlet "Set-NetIPAddress"
PS C:\Users\webadm> Get-NetAdapter | Get-NetIPAddress IPAddress : 10.145.0.118 InterfaceIndex : 12 InterfaceAlias : Ethernet AddressFamily : IPv4 Type : Unicast PrefixLength : 24 PrefixOrigin : Manual SuffixOrigin : Manual AddressState : Deprecated ValidLifetime
: Infinite ([TimeSpan]::MaxValue) PreferredLifetime : 00:00:00 SkipAsSource : False PolicyStore : ActiveStore PS
C:\Users\webadm> Get-NetAdapter | set-NetIPAddress -IPAddress 10.145.0.118 -AddressFamily IPv4 -AddressState Preferred set-NetIPAddress : No matching MSFT_NetIPAddress objects found by CIM query for instances of the ROOT/StandardCimv2/MSFT_NetIPAddress
class on the CIM server: SELECT * FROM MSFT_NetIPAddress WHERE ((IPAddress LIKE '10.145.0.118')) AND ((InterfaceIndex = 12)) AND ((InterfaceAlias LIKE 'Ethernet')) AND ((AddressFamily = 2)) AND ((AddressState = 4)). Verify query parameters and retry. At line:1
char:18 + Get-NetAdapter | set-NetIPAddress -IPAddress 10.145.0.118 -AddressFamily IPv4 -A ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (MSFT_NetIPAddress:String) [Set-NetIPAddress],
CimJobException + FullyQualifiedErrorId : CmdletizationQuery_NotFound,Set-NetIPAddress
Can anyone tell what's going wrong? thanks.Hello !
To add an IP address, you have to use New-NetIPAddress cmdlet.
Example:
New-NetIPAddress -InterfaceIndex 12 -IPv4Address 10.145.0.118 -PrefixLength 24
If you have to remove the
10.145.0.118 address, you can use Remove-NetIPAddress.
Hope this helps.
Note: This posting is provided 'AS IS' with no warranties or guarantees, and confers no rights. Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable. This helps the community, keeps the forums tidy, and
recognises useful contributions. -
How can I capture delete user event in Active Directory 2008 using Powershell command
Hi,
In my Active Directory every user have own home drive in the file server. When I delete user I also need to delete folder from the server.
My target is make the process automated, so that when I delete user account form AD, the folder associate with user also delete.
Can I write any power shell script to grep the delete event and remove folder from file server.
Thanks
Tamim KhanYou can setup event viewer to provide alerts (email alerts) for event id 630.
Find an existing Event ID 630 entry, right click on it and "Attach Task To This Event...."
Follow the wizard.
** Event ID Sample **
Event ID: 630
Type: Success Audit
Description: User Account Deleted:
Target Account Name: %1 Target Domain: %2
Target Account ID: %3 Caller User Name: %4
Caller Domain: %5 Caller Logon ID: %6
Privileges: %7
- Chris Ream -
**Remember, if you find a post that is helpful, or is the answer, please mark it appropriately.** -
Hi everyone,
I would like to know if it is possible to use a Powershell cmdlet to determine if Windows Server 2012 (R2) Source Files are present on disk.
We are using an automated PS script to install roles and features and some registry keys and applications afterwards. If the Source Files are not present, the script will fail, so I would like a# Check if Source Files are present # stage built in
the script to determine if the source files are present or that an alternate source path needs to be used.
Is this possible with Powershell and if so, how can we achieve this?
I'll appreciate your answer.
- RobHi Rob,
I assume that you are using powershell command "install-windowsfeature" .
I would suggest you add the parameter "-source" to specify the alternate path of thesource file .
" The path specified in this parameter is only used if the command cannot find feature files in the local side-by-side store of the specified target computer or VHD. "
For details please refer to the article below :
https://technet.microsoft.com/en-us/library/jj205467(v=wps.620).aspx
Best Regards,
Elton Ji
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] . -
Hello everybody,
This is my first time posting in this forum and i have encounted an issue i hope you can help i'm trying to create a powershell 1.0 script as this is for Windows XP to copy default policy back to their original folder then do a gpupdate on the copmuter so
that the Local policy are returned to their default but i'm having access denied as this is user account and needed a way to make it run as an administrator but without success as i'm new powershell.
Copy-Item 'C:\WINDOWS\system32\GroupPolicy\Original Group Policy for User and Machine\Machine\*' 'C:\WINDOWS\system32\GroupPolicy\Machine\'
Copy-Item 'C:\WINDOWS\system32\GroupPolicy\Original Group Policy for User and Machine\User\*' 'C:\WINDOWS\system32\GroupPolicy\User\'
Your help is much appreciated.Hi mniceguy81,
Did you try to enable "run as" in XP ?
Please refer to following link :
http://support.microsoft.com/kb/294676
And please try to use powershell command :
$cred = New-Object Management.Automation.PSCredential("$UserName", $securePassword)
copy-item xxxx xxxx -credential $cred
Best Regards
Elton Ji
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
How to set security group as primary site collection admin and secondary site collection admin using powershell in sharepoint online site - office 365?
Hi,
According to your description, my understanding is that you want to set security group as admin of primary and secondary site collection using PowerShell command in office 365.
I suggest you can use the command below to set the group to site owner, then it will have the site collection admin permission.
Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -Owner [email protected] -NoWait
Here are some detailed articles for your reference:
https://technet.microsoft.com/en-us/library/fp161394(v=office.15)
http://blogs.realdolmen.com/experts/2013/08/16/managing-sharepoint-online-with-powershell/
Thanks
Best Regards
Jerry Guo
TechNet Community Support
Maybe you are looking for
-
I simply need help placing my FCP sequence on DVD - The basics
Hello All, I've completed a sequence on FCP that I would like to place on DVD. I have followed the instructions in Final Cut Pro - Beyond the Basics, but apparently I'm not. The files are showing up on the DVD, but the file transfer process never sto
-
Display image from the attachment folder
Hello, At the moment I am working on an embedded component for the marketing lead TI. The purpose of the component is to show a image stored in the attachment folder. In order to realize my plan I used a image control in the UI designer and bound it
-
Purchase bills payments against the PO (URGENT)
hi experts i am finding ap invoices payments against the Purchase orders. where i can get this informations stores ..can anybody tells me where should i focus .. and in which tables i can get this information combination stores. In the depth explans
-
Did the members of this forum know that Oracle has no intention of replacing the OCp exam relevant to Financials that it has discontinued from June 30 of 2001. It is now left to local country organisations to hold there own exams & give their own cer
-
Cannot delete e-Mail message in lion without opening the message
To avoid span or just not bother opening an e-mal "BEFORE LION" all that had to be done was to hightlight the email and hit the delete button. Now with LION when you hightlight the email message it immedately opens the message in the right side box.